Message Boards Message Boards

0
|
8057 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How Can I Get a List of Global Variables?

Posted 10 years ago

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

POSTED BY: Gregory Lypny
4 Replies
Posted 10 years ago

Thanks, Craig. Much obliged.

Gregory

POSTED BY: Gregory Lypny
Posted 10 years ago

Thanks, Francisco.

Gregory

POSTED BY: Gregory Lypny

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
Names["Global`*"]

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

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