Quote Originally Posted by dlorde View Post
Exit the loop immediately after resetting the number (i.e. in the 'if' block). This points to the value of always using curly braces {} with control statements like 'if'.

Experience is a poor teacher: it gives its tests before it teaches its lessons...
Anon.
Thanks for your pointer. Works now.