ENDFOR Command

ENDFOR — End of a loop structure.

Synopsis

ENDFOR

Introduction

The ENDFOR command is the last statement of a loop structure and marks the end of it. When reaching this command, processing continues at the beginning of the FOR or FOREVER loop structure of the matching ENDFOR. In case of the FOR loop, the counter will be raised with the STEP value. Loop structures can be nested.

Arguments

None.

Example

. . .
. . .
FOR L-Counter = 1 TO 4 STEP 1
    LET V-status = CALL ProcessOrder
    IF V-status = C-Fault THEN
        CONTINUE
    ENDIF
ENDFOR
. . .
. . .

Related Commands

BREAK CONTINUE FOR FOREACH FOREVER