Monday, 28 July 2014


In this case, the procedure(s) referred are performed until the condition specified by the UNTIL phrase is true. 

If the TEST BEFORE phrase is specified or assumed, the condition is tested before any statements are executed (corresponds to DO WHILE) and if the TEST AFTER phrase is specified, the statements to be performed are executed at least once before the condition is tested (corresponds to DO UNTIL).

Format : PERFORM [procedure-name]
                          [WITH TEST {BEFORE | AFTER}]
                          [VARYING identifier-1
                 FROM {identifier-2 | integer-1} BY {identifier-3 | integer-2}
                 UNTIL condition
                           [statement-1 ...]

Example :

Created with Artisteer

No comments:

Post a comment