in reply to post-increment/pre-increment blues
In fact, the equivalent C code "i+(i++)" is undefined behaviour in ISO C: the compiler is allowed to return (assuming the variable starts off with 2) any value, or write code to format your computer's disks, or write code to format everybody else's computers' disks, or cause daemons to fly out of your nose.
For related fun, try the various "$i=$i++" (also undefined).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |