MathGroup Archive 1997

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

Search the Archive

Re: names, symbols, and contexts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6193] Re: [mg6175] names, symbols, and contexts
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Thu, 27 Feb 1997 02:53:28 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

murray at math.umass.edu (Murray Eisenberg)
[mg6175] names, symbols, and contexts


> Here's the problem:  a symbol fname contains the name of a
> Mathematica object, e.g.:
>
>   fname = "myf"
>
> The question is how to determine the context of the object named
> byfname (in our case, the context of myf).

Murray,
The following may help:

ff = "hh";
hh = Tan;
	
Context@@ToExpression[ff,InputForm, Hold] (*context of hh*)
	
	Global`

Context[Evaluate[ToExpression[ff]] (*context of value of hh*)
	
	System`
	
	
Allan Hayes
hay at haystack.demon.co.uk
http://www.haystack.demon.co.uk


  • Prev by Date: Re: HelpBrowserSettingsSize "out of range"?
  • Next by Date: Re: Information about non-symbol heads
  • Previous by thread: names, symbols, and contexts
  • Next by thread: Re: names, symbols, and contexts