3

I've tried using varinfo(aModule) where aModule was incorporated with using. But this just prints out

name size summary
–––––––––––– ––––––––– –––––––
aModule 104 bytes Module

John Trinder
  • 127
  • 4

1 Answers1

2

Suppose you have a module M

julia> module M
          a=5
          b=7
          c=[1,2,3]
       end

Than you can just do:

julia> names(M, all=true)
8-element Vector{Symbol}:
 Symbol("#eval")
 Symbol("#include")
 :M
 :a
 :b
 :c
 :eval
 :include

You can get the value of each field:

julia> getproperty(M, :c)
3-element Vector{Int64}:
 1
 2
 3
Przemyslaw Szufel
  • 40,002
  • 3
  • 32
  • 62