Hi,
I just have a quick question regarding the terms PARAMETERS and ARGUMENTS. I know that one of them is referred to the variables when you are making a class/function and the other is referred to the variables when you are calling that function. I just don't know which is which. I tried looking it up but I couldn't find a clear distinction between the two.
Thanks in advance
Ken.
A simple definition clarification.
Started by T121AD, Dec 09 2007 06:34 PM
2 replies to this topic
#1
Posted 09 December 2007 - 06:34 PM
|
|
|
#2
Posted 09 December 2007 - 07:21 PM
If you search google for "argument vs parameter" you actually get linked to the same question I previously asked which never received a great answer. So I decided to look it up in my class notes.
Generally the terms are used interchangeably. However, parameters are declared in the function/method header. Arguments are the values you pass to the function/method when you call it.
Generally the terms are used interchangeably. However, parameters are declared in the function/method header. Arguments are the values you pass to the function/method when you call it.
function nameOfFunction(int x) {
//code
}
x is the parameter.nameOfFunction(5)5 is the argument.
#3
Posted 09 December 2007 - 08:07 PM
I should have thought to search for that. But nevertheless, thank you very much for the clarification.


Sign In
Create Account

Back to top









