![]() |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The while statement is pretty straight-forward, you can guess from the
very name what it does. The statement will perform another statement over
and over until a given while
expression returns false. The syntax is
simple:
while (<test expression>) |
Note carefully that the test expression is checked first of all, before running the statement the first time. If it evaluates as false the first time, the body is never executed.
a = 0; while (a != 4) { a += 5; a /= 2; } |