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 > Do .. while

Do

Do .. while is post condition repeat statement: statement inside do (called body) is repeated as long as the condition expression evaluates to "true". If it evalutes to "false", looping is terminated. Due to post conidition, the body of do statement is always evaluted at least once.

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

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