BREAK and CONTINUE
The BREAK and CONTINUE verbs alter the program execution sequence. BREAK terminates the currently active LOOP/REPEAT, even if there are several levels of active IF/ENDIF instructions. CONTINUE forces execution to resume at the currently active LOOP instruction even if there are several levels of IF/ENDIF instructions. These structures use the following formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
condition
Required. A valid check for a Flag or Expression.
Flags Affected: Function Key Flag
Note the following:
The Function Flag is reset if tested and it was true.
If a FILEPI instruction is active, the FILEPI count is not decremented by this instruction.
BREAK and CONTINUE statements must be physically located within the scope of a LOOP/REPEAT structure.
Example 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The LOOP is terminated when the F1 function flag is TRUE.
Example 2:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The CONTINUE causes the program execution to branch back to the LOOP if the operator entered '5' into 'A'.
See Also: LOOP/REPEAT, Program Control Instructions
![]() |