MathGroup Archive 1997

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

Search the Archive

Re: Symbols, names, objects


Hi Murray,

did You ever understand the ``non standard evaluation'' in the 
Mathematica Book ? no -- here is what You want

No strings at all but the HoldAll-Atribute to Your Store-function

In[1]:=
SetAttributes[Store,HoldAll]
Store[x,term]:=(x=Evaluate[term])

Let's try it:

In[3]:=
x=1; term={1,2,3};


In[4]:=
Store[x,term]

Out[4]=
{1,2,3}

Is x still 1 ?

In[5]:=
x

Out[5]=
{1,2,3}

no - all works fine. 

In fact You need only the HoldFirst-Attribute to keep the
first argument of Store unevalueted.

Hope that helps
Jens


  • Prev by Date: Re: Mobius strip
  • Next by Date: Re: Mathematica EmPOWERment Tour
  • Previous by thread: Re: Symbols, names, objects
  • Next by thread: Re: Symbols, names, objects