parameter passing

Updated About content Print Article Share Article
views updated

parameter passing The mechanism used to pass parameters to a procedure (subroutine) or function. The most common methods are to pass the value of the actual parameter (call by value), or to pass the address of the memory location where the actual parameter is stored (call by reference). The latter method allows the procedure to change the value of the parameter, whereas the former method guarantees that the procedure will not change the value of the parameter. Other more complicated parameter-passing methods have been devised, notably call by name in Algol 60, where the actual parameter is re-evaluated each time it is required during execution of the procedure.