MathGroup Archive 2013

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

Search the Archive

Re: "Programming With Mathematica" Exercise help


> In order to block evaluation during input use "Unevaluated"
>
> z = 11;
> a = 9;
> Unevaluated[z + 3] /. z -> a

This seems closest in spirit to what I thought the answer was meant to be. 
 I had to put a HoldPattern on the z in the right half of the substitution 
or it would evaluate to 11 and so end up as 11->a.  Nice, though, because it didn't require the ReleaseHold.



  • Prev by Date: Re: "Programming With Mathematica" Exercise help
  • Next by Date: Re: "Programming With Mathematica" Exercise help
  • Previous by thread: Re: "Programming With Mathematica" Exercise help
  • Next by thread: Re: "Programming With Mathematica" Exercise help