|
IDL Reference Guide: Procedures and Functions |
|
The WHILE...DO statement performs its subject statement(s) as long as the expression evaluates to true. The subject is never executed if the condition is initially false.
| Note For information on using WHILE...DO and other IDL program control statements, see Program Control. |
WHILE expression DO statement
or
WHILE expression DO BEGIN
statements
ENDWHILE
i = 0 WHILE (i EQ 1) DO PRINT, i
Because the expression (which is false in this case) is evaluated before the subject statement is executed, this code yields no output.
IDL Online Help (March 06, 2007)