Removing Parameters from the Stack

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.