WHILE
loops
When evaluating the condition of a WHILE
loop, NULL
has the same effect as in an IF
statement: if the condition resolves to NULL
, the loop is not (re)entered — just as if it were false
.Again, watch out with inversion using NOT
: a condition like
while ( Counter > 12 ) do
will skip the loop block if Counter
is NULL
, which is probably what you want, but:
while ( not Counter > 12 ) do
will also skip if Counter
is NULL
.Maybe this is also exactly what you want — just be aware that these seemingly complementary tests both exclude NULL
counters.