do..while

Availability

Flash Lite 1.0.

Usage

do {
    statement(s)
} while (condition)

Parameters

statement(s) The statement(s) to execute as long as the condition parameter evaluates to true.

condition The condition to evaluate.

Description

Statement; executes the statements, and then evaluates the condition in a loop for as long as the condition is true.

Example

The following example increments the index variable as long as the variable's value is less than 10:

i = 0;
 do {
     //trace (i);                            // output: 0,1,2,3,4,5,6,7,8,9
     i++;
 } while (i<10);

See also

break, continue, for, while