next up previous contents
Next: Blocks Up: Expressions Previous: Conditionals   Contents


A loop has the form
while <expr> loop <expr> pool
The predicate is evaluated before each iteration of the loop. If the predicate is false, the loop terminates and void is returned. If the predicate is true, the body of the loop is evaluated and the process repeats.

The predicate must have static type Bool. The body may have any static type. The static type of a loop expression is Object.