Is there a way to have dynamic default arguments?
有没有办法动态的默认参数?
Having default arguments seems like a cool feature.
参数拥有默认值看起来很牛。
Why non-default arguments can't follows default argument?
为什么非默认的参数可以不遵循默认参数?
Default arguments cannot be used to deduce a template argument.
无法使用默认参数推导出模板参数。
In the third pair, the parameter lists differ only in their default arguments.
在第三对中,形参列表只有默认实参不同。
Default arguments are not allowed on an explicit specialization of a function template.
不允许在函数模板的显式专用化上使用默认参数。
Functions can have default arguments, as shown for the value argument of the compute function.
函数可以有默认参数,如compute函数的值参数所示。
Default arguments on functions and methods greatly reduce the number of overloaded methods you need to create.
函数和方法的默认参数极大地减少了需要创建的重载方法数量。
Default arguments are arguments and are treated the same way as any other argument during function matching.
默认实参也是实参,在函数匹配过程中,它的处理方式与其他实参一样。
Named and default arguments work hand in hand; one can pick a certain parameter by its name and use defaults for the others
具名与默认参数经常搭配使用,我们可以根据参数名称为参数赋值,同时对其他参数使用默认值,如下代码片段所示
Default arguments ordinarily should be specified with the declaration for the function and placed in an appropriate header.
通常,应在函数声明中指定默认实参,并将该声明放在合适的头文件中。
Scala 2.8 also offers new language features, like the new named and default arguments. Named arguments look like assignments to the names of the called method's formal parameters
Scala 2.8还增加了新的语言特性,如新的具名与默认参数。
We'll see another useful example of named and default arguments when we discuss case classes in the section called "case classes" in Chapter 6, Advanced Object-Oriented Programming in Scala.
我们会在《第6章-Scala高级面向对象编程》中的“CaseClass(案例类)”中看到另外一个使用命名参数和默认参数的例子。
Many languages let you define default values for some or all of the arguments to a method.
许多语言都允许你为一个方法的一个或多个参数定义默认值。
Get tired of typing in all the arguments every time, so make some of the arguments optional, with default values.
厌倦了每次都输入所有的参数,于是让一些参数成为可选的参数,让这些参数带有默认的值。
Named parameters are especially useful for calling stored procedures that have many arguments and some of those arguments have default values.
在调用具有许多参数,而且其中一些参数有默认值的存储过程时,命名参数特别有用。
Another interesting and simpler use case for this method is in providing default values for arguments.
这种方法的另一个更简单的有趣用例是,为参数提供默认值。
Note that you cannot supply request parameters in that fashion - pages will be invoked without (or with default) arguments.
注意,不能以这种方式提供请求参数—页面可以在没有参数的情况下调用(或使用默认参数)。
You do not need to set values for arguments that have default values because the server automatically uses the default values.
不需要为有默认值的参数设置值,因为服务器会自动使用默认值。
In the following unique stored procedure the arguments listprice and minprice have default values.
在下面的惟一的存储过程中,参数listprice和minprice有默认值。
If the number of parameters in CallableStatement is less than the number of arguments in the stored procedure, the remaining arguments must have default values.
如果CallableStatement中的参数数量少于存储过程中的参数数量,那么剩下的参数必须有默认值。
It also sets some default values for the script, and then parses the command-line arguments using the standard Bash shell's getopt function. (Listing 7 shows the output of this usage message.)
它还为此脚本设置了某些默认值,然后使用标准的Bashshell的getopt函数解析这些命令行参数(清单7给出了这个使用消息的输出)。
Accepted_args is an optional integer argument defining how many arguments your function can accept (default 1), useful because some hooks can pass more than one argument to your function.
accepted_args参数是一个可选的整型参数,他定义了你的函数中可以接收多少个参数(默认为1)。该参数是非常有用的,因为某些Hook可以向你的函数中传入多个参数。
Launching arguments provides the product with the default program arguments and VM arguments.
启动参数提供产品启动时的默认程序参数和VM参数。
The third and fourth arguments that specify the schema name and object name must be left blank so that the default schema SYSTOOLS and table name OPT_PROFILE are used.
第三个和第四个参数指定模式名和对象名,这两个参数必须留空,这样就将使用默认的模式SYSTOOLS和表名opt _ PROFILE。
If no arguments are specified on the command line, the default locale for the user's machine is used.
如果在命令行没有指定参数,则使用用户计算机的默认地区。
ESP or the top of the stack stores the number of command line arguments supplied to a program, which is 1 by default (for no command line arguments).
ESP(堆栈顶部)存储传递给程序的命令行参数数量,默认值是1(表示没有命令行参数)。
Note that you can drop the parentheses when using a default constructor (i.e., one that takes no arguments).
注意,你在使用默认构造函数时可以不用写括号(例如,没有参数的构造函数)。
Note that you can drop the parentheses when using a default constructor (i.e., one that takes no arguments).
注意,你在使用默认构造函数时可以不用写括号(例如,没有参数的构造函数)。
应用推荐