Evaluating Global Variables Named Strings as Variables
- To: mathgroup at smc.vnet.net
- Subject: [mg105465] Evaluating Global Variables Named Strings as Variables
- From: BenT <brtubb at pdmusic.org>
- Date: Fri, 4 Dec 2009 04:30:51 -0500 (EST)
Consider the output of this:
a=Names["System`$*"]
How does one then process/evaluate each String element of the
resulting List, as the global function name which it represents?
For a more direct (simpler) example: if given
a={$AddOnsDirectory,$BaseDirectory}
Then this output is obtained.
{C:\Documents and Settings\All Users\Application Data\Mathematica,C:
\Documents and Settings\All Users\Application Data\Mathematica}
However what I really want to be able to do is process "a" somehow so
that I get the effect of multiple Input cells with their corresponding
Output cells displayed, namely:
$AddOneDirectory
C:\Documents and Settings\All Users\Application Data\Mathematica
$BaseDirectory
C:\Documents and Settings\All Users\Application Data\Mathematica
How is this achieved?
--- Benjamin Tubb