How to get the global variables?


I was looking for a function, which gives the global variables available within the scope?

Is there such a function.


help?> whos                                                                                                                                                              
search: whos print_with_color                                                                                                                                            

  whos(io::IO=STDOUT, m::Module=current_module(), pattern::Regex=r"")                                                                                                    
  Print information about exported global variables in a module, optionally restricted to those matching pattern.                                                        

  The memory consumption estimate is an approximate lower bound on the size of the internal structure of the object.


Thanks you are awesome.!


I have one question though.

module DFT
           global a
           export f

                           DFT   1540 bytes  Module
                             f      0 bytes  DFT.#f

why is :a not present in the output?


Each module defines its own, separate scope: Edit: I misread. I guess whos chooses to only display exported variables, as stated in its doc: “Print information about exported global variables in a module”.