Jump to content

Difference between Parameter and Argument

TechFnatic
Go to solution Solved by fizzlesticks,

consider this code:

 

data = 3
data2 = 7.5
result = min(data, data2)

 

 

 

Is the data in the 3rd line a parameter or argument? Please explain the difference

Link to comment
Share on other sites

Link to post
Share on other sites

min(data , data2) are your parameters and when you call min with min(3, 7.5) the 3 and 7.5 would be your arguments. refer to the link given above which is pretty much an okay explanation.

|CPU: Intel i7-5960X @ 4.4ghz|MoBo: Asus Rampage V|RAM: 64GB Corsair Dominator Platinum|GPU:2-way SLI Gigabyte G1 Gaming GTX 980's|SSD:512GB Samsung 850 pro|HDD: 2TB WD Black|PSU: Corsair AX1200i|COOLING: NZXT Kraken x61|SOUNDCARD: Creative SBX ZxR|  ^_^  Planned Bedroom Build: Red Phantom [quadro is stuck in customs, still trying to find a cheaper way to buy a highend xeon]

Link to comment
Share on other sites

Link to post
Share on other sites

min(data , data2) are your parameters and when you call min with min(3, 7.5) the 3 and 7.5 would be your arguments. refer to the link given above which is pretty much an okay explanation.

Thanks a lot man, that really cleared things up. Was a bit confused... but that should do it!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×