MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Retrieve definitions (aka ?)

  • To: mathgroup at
  • Subject: [mg16129] Re: [mg16095] Retrieve definitions (aka ?)
  • From: Clemens Frey <clemens.frey at>
  • Date: Sat, 27 Feb 1999 03:23:02 -0500
  • References: <>
  • Sender: owner-wri-mathgroup at

Mitch Stonehocker wrote
> Hi,
> In the context of a larger process (in a Module[] for example) I want to
> see what the global/local definition of a variable.  


Hi Mitch,
for getting the right-hand sides of rules of the tmp=... type the
OwnValues-function can be used. So I would try something like the
following; notice that globaltmp=tmp relates to the global tmp:

tmp = 1;

f[x_] := Module[ {tmp,globaltmp=tmp},
  tmp = x;

Then this 
#[[1,2]]& /@ f[a+b]

will return

I don't know if the global definition of tmp can be retrieved in a more
straightforward way... Let's wait and see.

Hope that helps

  • Prev by Date: Re: Reset In[ ] & Out[ ]
  • Next by Date: Re: help with pde
  • Previous by thread: Using Utilities`Notation` in a package