什么是“论证”?
假设我有这段代码:
function question($argument)
{
var $q = "What does ($argument) mean?";
}
谁能告诉我是否还有其他单词(或短语)来定义参数是什么? 我问这个问题是因为英语是我的第二语言,我一生都无法在我的语言中找到一个词来定义“编程”中的“参数”。
我了解论证的工作原理以及它们的用途,我只需要一个同义词或短语就可以将其翻译成我的语言,以便于使用和理解。
我(用我的语言)想到的最好的事情是(传递的变量),听起来对吗?有没有更好的写法?
谢谢
Assuming I have this code:
function question($argument)
{
var $q = "What does ($argument) mean?";
}
Can any tell me is there any other word (or phrase) that defines what an argument is?
I'm asking this because English is my second language, and I can't for life find a word in my language that defines "argument" in "programming".
I understand how arguments work, and what they are for, I just need a synonym word or phrase to be able to translate it to my language to make it easy to use and understand.
The best thing that I came up with (in my language) is (Passed Variable(s)), does that sound right? Is there any better wording?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
参数
这有帮助吗?
(“传递变量”很接近......并且可能在您的语言中正常工作)
Parameters
Does that help?
("Passed Variables" is close ... and might work fine in your language)
我不会使用“传递变量”,因为参数不必是变量。
在此示例中也许可以看到该术语最常见的用法。考虑一下
大多数人会将 x 和 y 称为参数,并将 57/p*q+4 和 z 称为参数。请注意,参数是变量(除非该语言具有模式匹配,不太常见)并且参数可以是任意表达式。
现在您可能会听到人们将 x 和 y 称为“形式参数”,而参数则称为“实际参数”,但恕我直言,这种区别有点过时。但我可能是错的。
问题是,参数是在函数调用中传递给参数的表达式。所以也许“传递表达式”至少比“传递变量”更好。祝翻译愉快。计算词汇的一个有趣之处在于,几乎每个单词(函数、过程、类型、标签、常量、变量、表达式、声明、语句、运算符、参数、参数等)都只是借用了一个简单的古老英语单词。没有太多新颖的术语。
I wouldn't use "passed variable" because arguments do not have to be variables.
Perhaps the most common usage of the term is seen in this example. Consider
Most people would call x and y parameters, and call 57/p*q+4 and z arguments. Note that parameters are variables (unless the language has pattern-matching, not too common) and that arguments can be arbitrary expressions.
Now you may hear people call x and y "formal parameters" while the arguments are "actual parameters" but IMHO this distinction is a little old-fashioned. I may be wrong though.
The thing is that the argument is the expression that is passed to the parameter in a function call. So maybe "passed expression" is better than "passed variable" at the very least. Have fun translating. One fun thing about the vocabulary of computing is that almost every word (function, procedure, type, label, constant, variable, expression, declaration, statement, operator, argument, parameter, etc.) is just borrowed from a plain old English word. There aren't too many novel terms.
在调用端它是一个参数,在函数端它是一个形参。
“参数”与“参数”
On the calling side it's an argument, on the function side it's a parameter.
"Parameter" vs "Argument"
参数是传递给函数(也称为子例程)的内容。参数也称为参数。函数可能会接受一个参数并使用它来计算某些内容或修改参数本身。
An argument is what you pass into a function (also known as a subroutine). Arguments are also known as parameters. A function might take an argument and use it to calculate something or modify the argument itself.
参数是在调用函数期间起作用的函数的变量。
和
参数也是函数的变量,在该函数将值返回给程序期间起作用。
Arguments are the variables of the functions that works during calling them.
And
parameters are also the variables of the functions that works during returning value to the program by that function.