Hi i would like to do the following:
module DDF
end
struct DDF.XX
end
is there a way to do this?
Thanks
Hi i would like to do the following:
module DDF
end
struct DDF.XX
end
is there a way to do this?
Thanks
see below
The first argument to @eval
or eval
is the module in which you want evaluation to take place. So you actually can do what you’re asking for:
julia> module Foo; end
Foo
julia> @eval Foo struct Bar; end
julia> Foo.Bar()
Foo.Bar()
thanks – it turns out I have a use for this