Suppose I would like to access enlobing type from within a module. To be specific:
file Englobing.jl
using myModule
type MyType
a::Float64
b::Vector{Float64}
end
t = MyType( 1., [ 1., 2. ] )
x = [ .5, .5 ]
myFunc( x, t )
file myModule.jl
module myModule
export myFunc
function myFunc( x::Vector{Float64}, z::MyType )
[ operations ]
end
end
In this case, I would like to have access to the MyType type from the myModule module without using globals.
source
share