PROCEDURE INVOCATION Statement

A PROCEDURE INVOCATION statement causes a previously declared procedure to be executed as a subroutine.

<procedure invocation statement>

──<procedure identifier>─┬─────────────────────────┬───────────────────┤
                         ├─<actual parameter part>─┤
                         └─ () ────────────────────┘

<actual parameter part>

      ┌◄─┬───────────── , ───────────────┬─┐
      │  └◄─<parameter delimiter>────────┘ │
── ( ─┴────<actual parameter>──────────────┴─── ) ──────────────────┤

When a procedure is invoked, program control is transferred from the point of the PROCEDURE INVOCATION statement to the referenced procedure. When the procedure is completed, program control is transferred back to the statement following the PROCEDURE INVOCATION statement, unless a bad GO TO is executed in the referenced procedure. Bad GO TO statements are described in GO TO Statement.

A typed procedure returns a value. However, when a typed procedure is used in a PROCEDURE INVOCATION statement, this value is discarded.