Previous Topic Next topic Print topic


Removing Parameters from the Stack

Defining whether the called program removes the parameters from the stack before it returns to the calling program, or whether the calling program does it after receiving control back.
Restriction: The following applies to native COBOL only.

Different languages remove parameters from the stack at different times. In some languages, the called program removes the parameters before terminating and returning to the calling program. While in other languages, the calling program removes the parameters immediately after it receives control back.

In COBOL or C, the calling program removes the parameters, while in Pascal the called program removes them.

Specify the appropriate calling convention to ensure that the parameters are removed once and once only.

Previous Topic Next topic Print topic