|
IDL Reference Guide: Procedures and Functions |
|
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. |
FOR variable = init, limit [, Increment] DO statement
or
FOR variable = init, limit [, Increment] DO BEGIN
statements
ENDFOR
The following example iterates over the elements of an array, printing the value of each element: