$$ While-Statement ::= "repeat" {Statement} "while" Condition ";" {Statement} $$ "end" ["while"] ";"
You may wish to repeat a sequence of statements while a specific condition holds. This can be realised by the repeat loop. It has the following form:
repeat
statements1
while condition ;
statements2
end while;
The statements statements1 are executed. Then, condition is tested. If it holds, the statements2 are executed and the repeat statement is executed again. If condition does not hold, execution proceeds after the repeat statement.