Get a list of current variables in Julia Lang

前端 未结 5 1199
情书的邮戳
情书的邮戳 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

    Not sure if there is something better, but

    names(Main)[4:end]
    

    seems to work. The [4:end] part is because it includes :Main, :Core and :Base which I think you would not want. I hope they will always be at the beginning.

提交回复
热议问题