形参指定联编程序、绑定标志、构造函数实参、用于解释实参的特定于区域性的信息,以及可选激活特性。
Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, and optional activation attributes.
尽量尝试将您的扩展函数设计为仅使用双精度、字符串、布尔和节点集作为实参和返回值的类型。
Try to design your extension functions so that they use only doubles, strings, booleans, and node-sets as both arguments and return values.
在编写扩展函数时,应谨慎处理根据实参类型进行的方法重载。
Be cautious about method overloading based on argument type when you write extension functions.
如果服务器端组件上的方法具有非空返回值,该值就会作为其惟一的实参传递进此回调函数。
If the method on the server-side component has a non-void return value, that value is passed into the callback function as its only argument.
将很小的实参传递给函数。
正如先前所介绍的,存根方法会采用回调函数作为其最后的实参,该实参用来捕获响应中的球场列表。
As explained earlier, the stub method takes a callback function as its final argument, which is used to capture the list of courses in the response.
例如,由于函数的输出完全由其输入和代码决定,因此您无需使用相同的实参多次计算一个函数。
For instance, because the output of a function is completely determined by its input and its code, you don't need to evaluate a function more than once with the same argument.
事实上,Groovy先调用默认的无实参构造函数,然后调用每个字段的相应setter。
In reality, Groovy calls the default no-argument constructor first and then calls the appropriate setter for each field.
在不为这个构造函数提供任何实参的情况下创建实例是允许的,但只限于不需要登录的那些方法调用。
Creating an instance without any arguments to the constructor is valid, but you're limited to method calls that don't require a login. To have login access, use the following code.
无论实参是由用户还是由编译器提供的,这个函数都带有两个实参。
The function takes two arguments, whether they are supplied by the user or by the compiler.
例中的调用只有一个实参,而这些函数分别带有零个和两个形参。
Our call has only one argument, and these functions have zero and two parameters, respectively.
函数原型定义了所有和函数相关的类型信息:函数返回类型是什么、函数的名字、应该给这个函数传递什么类型的实参。
The function prototype defines all the type information related to the function: what its return type is, the function name, and what types of arguments may be passed to it.
如果在检查了所有实参后,仍找不到唯一最佳匹配函数,则该调用错误。编译器将提示该调用具有二义性。
If after looking at each argument there is no single function that is preferable, then the call is in error. The compiler will complain that the call is ambiguous.
通过自动提取函数调用中实际使用的实参与重载集合中各个函数提供的形参做比较,编译器实现该调用与函数的匹配。
The compiler matches a call to a function automatically by comparing the actual arguments used in the call with the parameters offered by each function in the overload set.
如果基类成员与派生类成员接受的实参不同,就没有办法通过基类类型的引用或指针调用派生类函数。
If the base member took different arguments than the derived-class member, there would be no way to call the derived function from a reference or pointer to the base type.
使用引用形参,函数可以直接访问实参对象,而无须复制它。
By using a reference parameter, the function can access the object directly without copying it.
默认实参也是实参,在函数匹配过程中,它的处理方式与其他实参一样。
Default arguments are arguments and are treated the same way as any other argument during function matching.
存在多个与实参匹配的函数,但没有一个是明显的最佳选择。这种情况也是,该调用具有二义性。
There is more than one function that matches and none of the matches is clearly best. This case is also an error; the call is ambiguous .
异常以类似于将实参传递给函数的方式抛出和捕获。
Exceptions are thrown and caught in ways that are similar to how arguments are passed to functions.
与任意函数调用一样,实参必须与它的形参匹配,它们的类型要么精确匹配,要么实参类型能够转换为形参类型。
As with any call, an argument might match its parameter either because the types match exactly or because there is a conversion from the argument type to the type of the parameter.
每次调用函数时,都会重新创建该函数所有的形参,此时所传递的实参将会初始化对应的形参。
Each parameter is created anew on each call to the function. The value used to initialize a parameter is the corresponding argument passed in the call.
至少有一个实参的匹配优于其他可行函数提供的匹配。
There is at least one argument for which the match is better than the match provided by any other viable function.
根据实参个数选出潜在的可行函数后,必须检查实参的类型是否与对应的形参类型匹配。
Having used the number of arguments to winnow the potentially viable functions, we must now look at whether the argument types match those of the parameters.
当调用派生对象的函数时,实参必须和派生类中函数定义相互匹配。
When the function is called through a derived object, the arguments must match a version of the function defined in the derived class.
编译器将选出形参个数和类型都与实参匹配的函数。
The compiler selects those functions that have the required number of parameters and for which the argument types match the parameter types.
通常,应在函数声明中指定默认实参,并将该声明放在合适的头文件中。
Default arguments ordinarily should be specified with the declaration for the function and placed in an appropriate header.
通常,应在函数声明中指定默认实参,并将该声明放在合适的头文件中。
Default arguments ordinarily should be specified with the declaration for the function and placed in an appropriate header.
应用推荐