Value result parameters

from Wikipedia, the free encyclopedia

Value result parameters ( call by value / return / result or copy in copy out ) are parameters of subroutines in programming languages that enable the transfer and return of values.

In contrast to value parameters , here the value of the formal parameter is copied back to the memory location of the argument copied into it when the subroutine ends. This leads to semantics that are easier to understand, since side effects of using the same reference multiple times are avoided.

The Ada programming language prescribes, among other things, value result parameter semantics. The parameters in this language are identified by

  • in : value parameters
  • out : result parameter
  • in out : value result parameter