The ++ is evaluated after the assignment.
Not quite; the assignment happens *last*. The increment occurs after the expression "i++" is evaluated. That expression ("i++") evaluates to the original value of i, and the result is "remembered". If the result of the expression "i++" is stored back into i, it's as if nothing happened at all. Here's another example:
The right-hand expression is evaluated as follows, starting with the first i++, the second i++, then adding the results of those two expressions, then assigning *that* value to i...
[ September 30, 2005: Message edited by: Steve Morrow ]