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:

 

(1)

[label]

BREAK

 

(2)

[label]

BREAK

IF [NOT] {condition}

(3)

[label]

CONTINUE

 

(4)

[label]

CONTINUE

IF [NOT] {condition}

 

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:

  1. The Function Flag is reset if tested and it was true.

  2. If a FILEPI instruction is active, the FILEPI count is not decremented by this instruction.

  3. BREAK and CONTINUE statements must be physically located within the scope of a LOOP/REPEAT structure.

 

 

See Also: Example Code, LOOP/REPEAT, Program Control Instructions

 



PL/B Language Reference BRANCHF CACHELIST and CACHELISTEND