Thread
:
Increment ordering
View Single Post
#
3
(View Single Post)
18th November 2008
IdOp
Too dumb for a smartphone
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
My copy of K&R says (page 49) that ++ has higher precidence than % .
And now for something completely different way to skin the fish:
variable1 = 3 - variable1;
should toggle nicely between 1 and 2 (;.
IdOp
View Public Profile
Find all posts by IdOp