Argument and Parameter (Backwoods Fork)


An argument is the information included between the () when any given function is called.

A parameter is a variable containing the information passed in from a function. It is just a predefined variable containing any information sent in!

Daniel Shiffman - Learning Processing:

Technically speaking, arguments are the variables that live inside the parentheses in the function definition, that is, “ void drawCar(int x, int y, int thesize, color c) . ” Parameters are the values passed into the function when it is called, that is, “ drawCar(80,175,40,color (100,0,100)); ” .

What is correct?


@juraj_pechac unfortunately, I would say both. As both have been used interchangeably in conversation.

Here are more definitions:

I would probably agree with Daniel Shiffman and say that we normally refer to a function’s arguments (noun) and to passing in parameters. (the object passed in)

Therefore a parameter would be a specific argument.

But if someone asked me what the parameters of a function were I would still understand that they are asking for the content definition of a function.


Interesting! I’ve generally heard it as parameters being the definition, arguments being the value. For example: