Message Boards Message Boards

GROUPS:

How Can I Get a List of Global Variables?

Posted 9 years ago
7254 Views
|
4 Replies
|
3 Total Likes
|

Is there a Mathematica function that returns a list of all user-defined global variables?

POSTED BY: Gregory Lypny
4 Replies

Here is a small modification to F. Rodriquez's answer.

This will indicate the memory utilized by the global variables.

checkMemory[]:=Grid[Sort[({ByteCount[ToExpression[#1]],HoldForm[#1]}&)/@Names[Global`*],First[#1]>First[#2]&]]
POSTED BY: W. Craig Carter

Thanks, Craig. Much obliged.

Gregory

POSTED BY: Gregory Lypny
Names["Global`*"]

That gives you the list of all definitions within Global context.

Thanks, Francisco.

Gregory

POSTED BY: Gregory Lypny
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract