<< Click to Display Table of Contents >> Navigation: »No topics above this level« REPEAT statement |
mapp Services V5.16
Statements can be executed repeatedly with the REPEAT statement.
REPEAT
<statement_list>
UNTIL
<expression>
END_REPEAT;
The statements in <statement_list> are repeatedly executed until expression <expression> returns the value FALSE. Terminating condition <expression> is checked only after the statements in <statement_list> have been executed. This means that the loop runs at least once, regardless of the terminating condition.
If expression <expression> never has the value TRUE, then the statements will iterate infinitely, causing a runtime error.
REPEAT
Var1 := Var1 - 1;
Var2 := Var2 * 2;
UNTIL
Var1 = 0
END_REPEAT;