Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Evaluation details

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86756] Re: Evaluation details
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 20 Mar 2008 02:54:41 -0500 (EST)
  • References: <frqpsf$57r$1@smc.vnet.net>

But the right hand side IS evaluated and when it sees x it looks for any 
rules for x and finds the current definition. Should it behave this way? If 
it didn't, then what about the delayed set?

Clear[x]
x := x + 1

Now evaluating x gives the same recursion error.

Maybe you really want Increment or PreIncrement?

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Mumbo Jumbo" <mjumbo at gmail.com> wrote in message 
news:frqpsf$57r$1 at smc.vnet.net...
> Hello,
>
> I am quite puzzled why a Mathematica statement
> x=x+1;
> causes infinite recursion. Since the ducumentation states that the lhs of
> this statement is not evaluated, it seems to me that the evaluation of the
> rhs should not lead to recursive evaluation.
> TIA, Yuri.
>
> 



  • Prev by Date: Re: V.6.0.2 gripes...
  • Next by Date: Re: Creating a function that is a derivative of another function??
  • Previous by thread: Re: Evaluation details
  • Next by thread: Rainflow Cycle Counting with Mathematica