Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: "Programming With Mathematica" Exercise help

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130471] Re: "Programming With Mathematica" Exercise help
  • From: plank.in.sequim at gmail.com
  • Date: Sat, 13 Apr 2013 20:36:34 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kk5r6r$ric$1@smc.vnet.net> <kkasd1$ril$1@smc.vnet.net>

> 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