parametergre issue和argumentt的区别

2008年10月 挨踢职涯大版内专家分月排行榜第二
本帖子已过去太久远了,不再提供回复功能。argument和parameter的区别
看《TIJ》时老看到“引数”这个词,觉得怪别扭的,但一直没去查引数和参数有何区别,先查资料终于明白了:1.http://blog.chinaunix.net/u/25073/showart_188475.html
一般说来,两个是可以互换的。但是 C 程序员的习惯是:parameter 是参数,而 argument
是参数的值。也就是说,函数原型的参数列表,是 parameter list,比如
int sum(int a, int b);
而当使用的时候
sum = sum(10, 20);
10 和 20 则是 argument。
这个习惯也影响了很多其他语言的程序员。如果要混合两者的意义,一般用 argument,而 parameter 则比较少用。
argument 有的时候也被称作 actual parameter。
对应的中文术语是
parameter = 形参 (估计是「形式参数」简称)
argument = 实参 (估计是「实际参数」简称)&
2.http://royfang./blog/cns!53F57C7F0CE9D52C!125.entry
argument和parameter是有区别的,过去的资料中统一翻译为参数是不准确的,前者翻译成引数,后者翻译成参数,这样的翻译才是精确的翻译,两者的区别如下文:
What is the difference between an argument and a parameter?
引数和参数有何区别?
While defining method, variables passed in the method are called
parameters.&
当定义方法时,传递到方法中的变量称为参数.
While using those methods, values passed to those variables are
called arguments.&
当使用方法时,传给变量的值称为引数.
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。Parameters VS Arguments/Parameters 与 arguments的区别 - 老李的菜园 - 博客园
In a word, 简单的说:这两个术语一个用在函数定义时,一个用在函数调用时~
These two terms are sometimes loosely
in particular, "argument" is sometimes used in place of "parameter". Nevertheless, there is a difference. Properly, parameters appear in p arguments appear in procedure calls.
A parameter is an intrinsic property of the procedure, included in its definition. For example, in many languages, a minimal procedure to add two supplied integers together and calculate the sum total would need two parameters, one for each expected integer. In general, a procedure may be defined with any number of parameters, or no parameters at all. If a procedure has parameters, the part of its definition that specifies the parameters is called its parameter list.
By contrast, the arguments are the values actually supplied to the procedure when it is called. Unlike the parameters, which form an unchanging part of the procedure's definition, the arguments can, and often do, vary from call to call. Each time a procedure is called, the part of the procedure call that specifies the arguments is called the argument list.
Although parameters are also commonly referred to as arguments, arguments are more properly thought of as the actual values or references assigned to the parameter variables when the subroutine is called at . When discussing code that is calling into a subroutine, any values or references passed into the subroutine are the arguments, and the place in the code where these values or references are given is the parameter list. When discussing the code inside the subroutine definition, the variables in the subroutine's parameter list are the parameters, while the values of the parameters at runtime are the arguments.
Many programmers use parameter and argument interchangeably, depending on context to distinguish the meaning. The term formal parameter refers to the variable as found in the function definition (parameter), while actual parameter refers to the actual value passed (argument).}

我要回帖

更多关于 js中的argument 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信