On Mon, 2 Dec 2013 22:57:30 +1000, Amit Saha <amitsaha.in at gmail.com> wrote: > You missed the fact that I am printing the value of x *after* incrementing it. You're quite right, sorry. I'm too accustomed to the usual c idiom, which would increment the value at the end of the loop. -- DaveA