Re: function/procedure arguments
- Posted by _tom (admin) Mar 13, 2018
- 1081 views
( Note that authors are always getting parameter and argument confused. Some authors resort to calling an argument a formal parameter. )
That be wrong too.
The term parameter (sometimes called formal parameter) is often used to refer to the variable as found in the function definition, while argument (sometimes called actual parameter) refers to the actual input supplied at function call.
Pete
I have seen all kinds of variations of how parameter is used. These authors have not looked at wikipedia.
In the days before computers it was clear that an argument to a function was the supplied value:
sin(x)
`x` is the argument to a trigonometric function
That leaves parameter as the variable defined in a function signature.
As a supporter of Luddites I use this as my starting point.
_tom