in reply to Why is the null while-loop condition expression true?
As a special case, if the test in the for loop (or the corresponding while loop) is empty, it is treated as true. That is, bothNot very well placed documentation, and counter-intuitive from my perspective, but documented.andfor (;;) { ... }are treated as infinite loops.while () { ... }
Update:: A little Googling pulled up while () vs. while (1), particularly Re: while () vs. while (1).
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|