INVOCATION Statement

An INVOCATION statement causes a previously declared procedure to be executed as a subroutine, an asynchronous process, a coroutine, or an independent program.

<invocation statement>

──┬─<call statement>─────────────────┬─────────────────────────────────┤
  ├─<procedure invocation statement>─┤
  ├─<process statement>──────────────┤
  └─<run statement>──────────────────┘

The CALL statement invokes a procedure to execute as a coroutine. The PROCEDURE INVOCATION statement invokes a procedure to execute as a subroutine. The PROCESS statement invokes a procedure to run as an asynchronous process. The RUN statement invokes a procedure to run as an independent program.

With the exception of the PROCEDURE INVOCATION statement, a separate stack is initiated and the specified procedure cannot be a typed procedure.

With the exception of the RUN statement, parameters can be call-by-name or call-by-value. All parameters passed in the RUN statement must be call-by-value.