Usually "Parameter” and “Argument” are used interchangeably to refer to the variables that you use to define and pass into a method.
A "parameter" is the definition of the variable that is used to pass data into a method (a sub/function).
For example, "param" is being defined in this statement as a "parameter" for the exampleFunction:
- Function exampleFunction( ByVal param As String) As String
When using the exampleFunction, the data passed into the exampleFunction as "param" is referred to as the "argument". For example:
-
String arg = "The argument"
-
String result = exampleFunction(arg)
-
The variable "arg" is the is initialized with data at run time and is passed to the exampleFunction method. That piece of data passed into the exampleFunction is the
argument.
In other words, an "argument" is the piece of data that is passed into the function.
Like I said, the words are interchangeable and other developers will understand what you mean from the context. Usually people don't have to think about these things.
See
wikipedia's article on Parameters for a much better explanation than mine.
-Frinny