in reply to Re: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables

My guess: the entire right hand expression is evaluated before assignments are made.
Good guess. Doesn't really answer the question though, as any assignment will evaluate the RHS before doing the assignment. (If it didn't, what would it assign? Purple monkeys?)
  • Comment on Re^2: Pre vs Post Incrementing variables

Replies are listed 'Best First'.
Re^3: Pre vs Post Incrementing variables
by MidLifeXis (Monsignor) on Sep 14, 2010 at 16:20 UTC

    Pink. Purple is on Thursdays.

    --MidLifeXis

      Except at night.

Re^3: Pre vs Post Incrementing variables
by girarde (Hermit) on Sep 14, 2010 at 18:07 UTC
    Actually, it does. Evaluating that right hand increments $i twice. This occurs before either of the assignments.