Skip to main content
added 365 characters in body
Source Link
Martin Ender Mod
  • 198.3k
  • 14
  • 181
  • 311

Functions may output by modifying their arguments or writing to out arguments

Here, "out arguments" refers to arguments that are passed in by reference, so that modifying the value inside the function (as opposed to just overwriting the argument) also modifies the value outside the function (otherwise, the output value would not be observable after the function returns). Note that this is not possible in all languages with all types.

Functions may output by modifying their arguments or writing to out arguments

Functions may output by modifying their arguments or writing to out arguments

Here, "out arguments" refers to arguments that are passed in by reference, so that modifying the value inside the function (as opposed to just overwriting the argument) also modifies the value outside the function (otherwise, the output value would not be observable after the function returns). Note that this is not possible in all languages with all types.

Post Made Community Wiki by Martin Ender
Source Link
Martin Ender
  • 198.3k
  • 14
  • 181
  • 311

Functions may output by modifying their arguments or writing to out arguments