FOREVER Command

FOREVER — Execute a block of logic commands an unlimited number of times.

Synopsis

FOREVER

Introduction

The FOREVER command executes a block of logic commands located between the FOREVER and ENDFOR logic commands an unlimited number of times until a BREAK command is reached. The CONTINUE command can be used to stop processing the current iteration and to jump to the beginning of the loop.

Arguments

None.

Example

. . .
. . .
FOREVER
    LET V-status = CALL GetNextOrder
    IF V-status = C-OK THEN
        BREAK
    ENDIF
    CALL ProcessOrder
ENDFOR
CALL TotalOrder
. . .
. . .

Related Commands

BREAK CONTINUE ENDFOR