12.5.3.2 Loops and Repetitions within the current Command List |
Loops are used to repeat all or part of a sequence of commands within the current list.
The repeated commands may, of course, include calls to sub-routines
Repeating a path exactly N times.
for (var i = N; i > 0; --i) { // LOOP_START N stuff(); } // LOOP_END // etc
Repeating a path up to a maximum of N times.
for (var i = N; i > 0; --i) { // LOOP_START N if (IOPort.Read() == CONDITION) goto lineNumStuff; // BRANCH_ABS_COND goto lineNumAfterEndOfLoop; // LOOP_BREAK lineNumStuff: stuff(); } // LOOP_END lineNumAfterEndOfLoop: // etc
ListAPI Method | SP-ICE-3 Command |
---|---|