Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Language reference > Statements > Compound statements > While

While

While statement is pre condition repeat statement: contained statement is repeated as long as the condition expression evaluates to "true". If it evalutes to "false", looping is terminated. Due to pre conidition, the body of statement is not necessary evaluated at all.

A break statement will terminate execution of loop, while continue skips rest of statements in body (though finally statement are always executed) and goes back to testing the condition.

  while := "while" "(" expr-startcondition ")" statement 
See also  | Statements  | Break  | Continue  | Compound statements  | <while>  | Statement labels  | Grammar
Contributes notes:
Add a note
What's new | Anvil