|
|
Topic complex |
Language elements |
Function |
REPEAT |
Short |
Non-rejecting program loop |
Syntax |
REPEAT Anweisungen UNTIL boolexp |
Parameter |
boolexp: logical expression, selection |
Return |
|
See also: |
|
Description |
REPEAT leads to a so called non-rejecting loop. The orders are executed. After that the logical expression is tested. If it's value is FALSE the whole loop will be processed from beginning.
So, this loop will be processed at least once, even if the logical expression would return TRUE even before the loop is entered.
Example:
VAR i : INTEGER
REPEAT
cgiwriteln(str(i++))
UNTIL i>=10
|
Write a comment:
|
|
|