Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: "Programming With Mathematica" Exercise help
Replies: 10   Last Post: Apr 13, 2013 8:36 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
plank.in.sequim@gmail.com

Posts: 7
Registered: 4/11/13
Re: "Programming With Mathematica" Exercise help
Posted: Apr 13, 2013 8:36 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> 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.




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.