How can I load a package and then define some constants?
This is working great!
(StucturalUnits.jl reexports Unitful.jl and exports inch.)
["@u_str", "Unitful", "inch"] => :(@usingany StructuralUnits),
But I want more units available by default, and this is not working.
["@u_str", "Unitful", "inch", "mm", "psi"] => :(@usingany StructuralUnits; const mm=u"mm"; const psi=u"psi"),
julia> x = 2mm
┌ Info: Failed to run `begin
│ #= C:\Users\nboyer.AIP\.julia\config\startup.jl:43 =# @usingany StructuralUnits
│ #= C:\Users\nboyer.AIP\.julia\config\startup.jl:43 =#
│ const mm = u"mm"
│ #= C:\Users\nboyer.AIP\.julia\config\startup.jl:43 =#
│ const psi = u"psi"
│ end`
│ exception =
│ LoadError: UndefVarError: `@u_str` not defined in `Main`
│ Suggestion: check for spelling errors or missing imports.
└ in expression starting at C:\Users\nboyer.AIP\.julia\config\startup.jl:43
ERROR: UndefVarError: `mm` not defined in `Main`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] top-level scope
@ REPL[1]:1
[2] top-level scope
@ none:1
How can I load a package and then define some constants?
This is working great!
(StucturalUnits.jl reexports Unitful.jl and exports
inch.)But I want more units available by default, and this is not working.