Get a list of current variables in Julia Lang

前端 未结 5 1178
情书的邮戳
情书的邮戳 2020-12-29 18:07

I am new to Julia Lang. I am coming from the background of Matlab.

In Matlab, when pressing whos command I will get all variables in the current scope;

5条回答
  •  一生所求
    2020-12-29 18:09

    An Update:

    whos() 
    

    ... is not working either in iJulia or at the command prompt in Julia-1.0.0.

    It is working in Julia-0.6.4, though.

    On the other hand,

    varinfo()
    

    ....prints information about the exported global variables in a module. For Example,

    julia-1.0> varinfo()
    name                    size summary                        
    –––––––––––––––– ––––––––––– –––––––––––––––––––––––––––––––
    Base                         Module                         
    Core                         Module                         
    InteractiveUtils 154.271 KiB Module                         
    Main                         Module                         
    PyPlot           781.872 KiB Module                         
    ans               50.323 KiB Plots.Plot{Plots.PyPlotBackend}
    myrepl               0 bytes typeof(myrepl)                 
    x                   88 bytes 1×6 Array{Int64,2}             
    y                    0 bytes typeof(y)                      
    

    Hope, this is found useful.

提交回复
热议问题