LOOP
Repeats transformations, either over an index range or until a condition is met.
Syntax
Section titled “Syntax”LOOP [#i = start TO end [BY step]] [IF condition]. transformationsEND LOOP [IF condition].Synopsis
Section titled “Synopsis”| Kind | Transformation (pending until data is needed) |
| Body | free-form body |
| Changes data | yes, undoable |
Examples
Section titled “Examples”VECTOR q = q1 TO q10.COMPUTE n_high = 0.LOOP #i = 1 TO 10. IF (q(#i) >= 4) n_high = n_high + 1.END LOOP.- A loop without an index stops after 40 iterations unless it ends earlier through BREAK or END LOOP IF (a safety limit).
Related
Section titled “Related”Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.