Skip to content

LOOP

Repeats transformations, either over an index range or until a condition is met.

LOOP [#i = start TO end [BY step]] [IF condition].
transformations
END LOOP [IF condition].
Kind Transformation (pending until data is needed)
Body free-form body
Changes data yes, undoable
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).

END LOOP, BREAK, VECTOR


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.