1. 程式人生 > >Difference between argument and parameter

Difference between argument and parameter

Parameter is variable in the declaration of function.

Argument is the actual value of this variable that gets passed to function.

The Wikipedia article also states:

Although parameters are also commonly referred to as arguments, arguments are more properly thought of as the actual values or references assigned to the parameter variables when the subroutine is called at runtime.