TIL Argument vs Parameter

OK, I know naming idioms isn’t really a big deal. but yet it’s fun and useful to know 🙂

Parameter is the variable name in function definition/deceleration

Argument is the name of the variable when calling the function


void function( int Var1, int Var2 ) { //  do something

anotherFunction( int AnotherVar1, int AnotherVar2);

}

Var1, Var2 are called parameters

AnotherVar1, AnotherVar2 are called arguments …

 

Nowhere is better than wikipedia for more details 🙂

Advertisements

2 thoughts on “TIL Argument vs Parameter

Discuss

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s