|
IDL Reference Guide: Procedures and Functions |
|
The REPEAT...UNTIL statement repeats its subject statement(s) until an expression evaluates to true. The condition is checked after the subject statement is executed. Therefore, the subject statement is always executed at least once, even if the expression evaluates to true the first time.
| Note For information on using REPEAT_UNTIL and other IDL program control statements, see Program Control. |
REPEAT statement UNTIL expression
or
REPEAT BEGIN
statements
ENDREP UNTIL expression
This example shows that because the subject of a REPEAT statement is evaluated before the expression, it is always executed at least once: