What's the difference between an argument and a parameter?

后端 未结 30 1863
北恋
北恋 2020-11-22 01:08

When verbally talking about methods, I\'m never sure whether to use the word argument or parameter or something else. Either way the other people know what

30条回答
  •  你的背包
    2020-11-22 02:04

    A parameter is something you have to fill in when you call a function. What you put in it is the argument.

    Simply set: the argument goes into the parameter, an argument is the value of the parameter.

    A bit more info on: http://en.wikipedia.org/wiki/Parameter_(computer_science)#Parameters_and_arguments

提交回复
热议问题