Using Procedure References

If the procedure reference variable is invoked while it is uninitialized or has had NULL assigned to it, the program is terminated with the message INVALID STACK ARGUMENT.

When a typed procedure reference variable is used in a PROCEDURE REFERENCE statement, the value returned by the procedure reference is discarded.

The actual parameter part of a PROCEDURE REFERENCE statement must have the same number of entries as the formal parameter list in the declaration of the procedure reference identifier or procedure reference array. The formal and actual parameters are compared in the manner in which the formal and actual parameters are compared in a PROCEDURE INVOCATION statement.

Invoking a procedure through a procedure reference variable in a PROCEDURE REFERENCE statement is equivalent to invoking the procedure directly in a PROCEDURE INVOCATION statement. For more information, see PROCEDURE INVOCATION Statement earlier in this section.

Imported events and event arrays cannot be used as actual parameters in a PROCEDURE REFERENCE statement.