MathGroup Archive 2007

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

Search the Archive

Re: Variable containing code

  • To: mathgroup at
  • Subject: [mg74963] Re: Variable containing code
  • From: Albert <awnl at>
  • Date: Fri, 13 Apr 2007 01:58:10 -0400 (EDT)
  • References: <evkrsc$o5q$>


> how can one get at the value of a variable if this value is executable 
> code? E.g. consider variable t1:= Print["Hello"]. How can I set the 
> value of a second variable t2 to the value of t1 without executing the code?

either look up my other post about manipulating $Epilog or look up 
OwnValues in the HelpBrowser.  Or just use this:

OwnValues[t2] = OwnValues[t1] /. HoldPattern[t1] :> t2



  • Prev by Date: Re: bug in Integrate (5.2) (Fullani's integral)
  • Next by Date: Fourier Transforms
  • Previous by thread: Re: Variable containing code
  • Next by thread: Re: Variable containing code