Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*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: 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


  • Prev by Date: What is the funny-looking "i" in the palette?
  • Next by Date: Re: Integer Solutions
  • Previous by thread: Re: Symbols, names, objects
  • Next by thread: Symbols, names, objects: kludge