Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: names, symbols, and contexts

  • To: mathgroup at
  • Subject: [mg6193] Re: [mg6175] names, symbols, and contexts
  • From: Allan Hayes <hay at>
  • Date: Thu, 27 Feb 1997 02:53:28 -0500
  • Sender: owner-wri-mathgroup at

murray at (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).

The following may help:

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

Context[Evaluate[ToExpression[ff]] (*context of value of hh*)
Allan Hayes
hay at

  • 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