BREAK Examples


Example 1:

 

A

FORM

2

  

LOOP

 

  

KEYIN

*N,"ENTER A: ",A;

  

BREAK

IF F1

  

DISPLAY

*N,"VALUE: ",A;

  

REPEAT

 

 

The LOOP is terminated when the F1 function flag is TRUE.

 

Example 2:

 

A

FORM

2

  

LOOP

 

  

KEYIN

*N,"ENTER A: ",A;

  

BREAK

IF F1

  

CONTINUE

IF (A=5)

  

DISPLAY

*N,"VALUE: ",A;

  

REPEAT

 

 

The CONTINUE causes the program execution to branch back to the LOOP if the operator entered '5' into 'A'.

 

 



PL/B Language Reference BRANCHF Examples BTRIEVE Example