FOR
Syntax | Example | Version History | See Also
The FOR statement executes one or more statements repeatedly, incrementing or decrementing a variable with each repetition, until a condition is met.
Note
For more information on using FOR and other IDL program control statements, see Program Control (Application Programming).
Syntax
FOR variable = init, limit [, Increment] DO statement
or
FOR variable = init, limit [, Increment] DO BEGIN
statements
ENDFOR
Example
The following example iterates over the elements of an array, printing the value of each element:
Version History
See Also
BEGIN...END, BREAK, CASE, CONTINUE, GOTO, IF...THEN...ELSE, REPEAT...UNTIL, SWITCH, WHILE...DO, Program Control (Application Programming)