Cold Help System: Programming: ColdC Reference Manual: Language Structure: Statements: Looping Statements: while


The while statement is used to execute code as long as the condition expression is true. The while statement has the following syntax:

while (condition expression)
statement

The interpreter continually evaluates expression and executes statement until the return value of expression is false. Here is an example using a while statement:

a = 1;
while (a < 35)
    a *= 2;   
.tell("total: " + a);


for-list | for-range | while | break | continue


the Cold Dark