in reply to Re^9: Pre vs Post Incrementing variables
in thread Pre vs Post Incrementing variables
But, $n_after_the_first_increment would be different, by 1, to $n_after_the_second_increment, but your own output--in both the relevant case and your two fantasy cases--shows both digits are the same.
It returns $n (the scalar, not the value within) after first increment, not some copy $n_after_the_first_increment after the first increment.
And the only way for that to happen, is for both pre-increments to have occurred, before the subroutine gets whatever it is given.
You are mistaken. The first result in placed on the stack before the second is evaluated. See the code in the grandparent.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Pre vs Post Incrementing variables
by BrowserUk (Patriarch) on Sep 13, 2010 at 15:10 UTC | |
by ikegami (Patriarch) on Sep 13, 2010 at 15:29 UTC | |
by BrowserUk (Patriarch) on Sep 13, 2010 at 16:00 UTC | |
by ikegami (Patriarch) on Sep 13, 2010 at 16:47 UTC |