go top

default argument

  • 默认参数:在编程中,函数或方法的参数可以设置一个默认值,当调用者没有提供实际参数时,将使用这个默认值。

网络释义

  缺省参数

缺省参数 ( default arguments ) 在 C++ 函数原型或声明中,带缺省值声明的参数。

基于22个网页-相关网页

  默认参数

默认参数 ( Default arguments ) 是这样的:

基于12个网页-相关网页

  预设引数

预设引数 ( default arguments ) 提供预设功能 >>> def eat(maxprice, lunch='chickenrice', soup='no'):

基于6个网页-相关网页

短语

constructor with default arguments 带缺省参数的构造函数

Default values in arguments 参数的默认值

default template arguments 预设模板引数

双语例句

  • Functions can have default arguments, as shown for the value argument of the compute function.

    函数可以有默认参数,如compute函数的值参数所示。

    youdao

  • Named and default arguments work hand in hand; one can pick a certain parameter by its name and use defaults for the others

    具名与默认参数经常搭配使用,我们可以根据参数名称为参数赋值,同时对其他参数使用默认值,如下代码片段所示

    youdao

  • 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还增加了新的语言特性,如新的 具名与默认参数。

    youdao

更多双语例句
$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定