Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Pre vs Post Incrementing variables

by JavaFan (Canon)
on Sep 14, 2010 at 15:58 UTC ( [id://860121]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://860121]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-04-21 14:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found