Re: Symbols, names, objects
- To: mathgroup at smc.vnet.net
- Subject: [mg6526] Re: [mg6515] Symbols, names, objects
- From: jpk at max.mpae.gwdg.de
- Date: Mon, 31 Mar 1997 23:01:28 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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