Main About Download Documentation Resources

While Shape

Default Appearance

What it Does

A While Loop evaluates a Boolean expression and, if true, executes statements. It rechecks the expression and loops until it is false.


The example, to the right, prints the numbers from 1 to 100. The assignment statement "n = n + 1" increments the variable 'n' by 1 for each iteration of the loop.