Previous Topic Next topic Print topic


Example of Inefficient Use of the PERFORM Statement

An example of code that uses PERFORM in a way that might give unexpected results, becuase they depend on the setting of the “perform-type” directive. This is also poor programming style.

 procedure division.
     perform a thru c
     perform b thru d
     stop run.
 a.
     display "a".
 b.
     display "b". 
 c.
     display "c".
 d.
     display "d".
Previous Topic Next topic Print topic