规定了一个通用的可变函数参数(…t)及其传递(v…)。
A general syntax for variable function arguments (... t) and their propagation (v...) is now specified.
如何定义具有数量可变的参数(每个参数的类型可能不同)的模板化类或函数?
How do you define a templated class or a function with a variable number of arguments, each with a potentially different type?
这个调用从./linux/kernel/printk.c 中的printk函数开始,它会在使用 va_start解析可变长度参数之后调用vprintk(在同一个源文件)。
The call begins in ./linux/kernel/printk.c in the printk function, which calls vprintk (in the same source file) after resolving the variable-length arguments using va_start.
C支持使用 va_list定义具有数量可变的参数的函数,C++在这方面没有改进。
C has support for defining functions with a variable number of arguments using va_list, and C++ never improved on that.
在fp里,函数没有副作用,变量都是不易变的。而在OOP中,可变状态和副作用都十分常见,甚至是被鼓励的。
In FP, functions have no side effects and variables are immutable, while in OOP, mutable state and side effects are common, even encouraged.
设计内容:以STAR ES598PCI单板机,开发能够输出多种波形且频率可变的函数发生器。
Design content: STAR ES598PCI single board, developers can output a variety of waveforms and variable frequency function generator.
本文对无线传感器网络的节点配置问题的研究方法是一个对建立的目标价值函数的可变参数集进行优化,从中求得最优值的过程。
For the problem of WSN node deployment, this paper's researching approach is a process of optimizing the variable parameter set of object value function and then finding the optimal result.
函数编程可以避免使用状态和可变数据,并改为强调函数的应用。
Functional programming avoids state and mutable data, and instead emphasizes the application of functions.
该方法采用窗函数可变的广义s变换进行计算,不仅具有一定的抑制噪声的能力,而且充分利用了广义s变换分辨薄层的能力。
Applying the generalized s transform with arbitrary and varying window function, the new method has strong ability of restraining noise and distinguishing thin layers.
对于多媒体业务,当我们让传输时间是可变数据速率的函数时,该方案即可找出当前用户组的最优数据速率集,以使系统的传输时间最小。
When the time is expressed as a function of various data rates, the optimum set of data rates for concurrent user groups to achieve minimum transmission time can be derived.
很不幸,不可以将指针容器与标准库的可变算法共用。不过,这些算法中最有用的已经以成员函数的方式提供出来了。
Unfortunately it is not possible to use pointer containers with mutating algorithms from the standard library. However, the most useful ones are instead provided as member functions.
此外,对于可变变量,有时很难判断某个变量在传递到另一个函数时是否可更改。
Also, with mutable variables, it can sometimes be hard to tell if a variable might be changed when it is passed to another function.
但这意味着当函数进行函数调用时,所有在可变寄存器中的值都有可能会被重写。
However, that means that when a function makes a function call, it should expect that all of the values in volatile registers will be overwritten.
本地变量空间用作该函数的通用存储空间,寄存器保存区用于保存函数所使用的非可变寄存器的值。
The local variable space is used as a general storage area for the function, and the register save area is used to save the values of non-volatile registers that the function USES.
在下一期文章中,我将深入介绍函数编程中的重要概念:不可变性。
In the next installment, I'll talk in depth about one of functional programming's building blocks: immutability.
注意,函数只能作为不可变的序列访问这个列表—也就是说,尝试修改列表的内容会导致错误。
Note that the function can only access the list as an immutable sequence-that is, trying to modify the contents of the list results in an error.
研究眼睛特征提取过程中可变形模板中能量函数优化方法。
Investigates energy function minimization process for eye feature extraction based on deformable template.
编译器只会对具有显式参数的完整函数定义和简单的不可变值执行自动泛化。
The compiler performs automatic generalization only on complete function definitions that have explicit arguments, and on simple immutable values.
F#函数库(囊括从不可变列表到异步计算函数库的一些常用的东西)
the F# libraries (usual stuff, ranging from immutable lists to asynchronous computations library)
除构造函数之外,不再提供任何的可变方法。
Do not provide any mutating methods other than the constructor.
如果您有一个不可变对象,则必须要在构造函数中设置该对象将包含的任何状态。
If you have an immutable object, you must set whatever state it will contain in the constructor.
当作为构造函数参数时,这些可变或者不可变的变量会在一个对象被实例化的时候被初始化。
When used as constructor parameters, the mutable or immutable variables specified will be initialized when an object is instantiated.
因此,您永远都不该为一个不可变类提供一个无参数的构造函数。
Thus, you should never have a no-argument constructor for an immutable class.
这意味着以函数式语言编写多线程应用程序要容易得多,因为不可变数据结构与线程交互起来非常自然,因而代码可以很简洁。
This means that it is much easier to write multi-threading applications in functional languages because immutable data structures inherently interact cleanly with threads.
提出了一种用于图像分割的分段可变形模型,并在模型的能量函数中引入了仿射不变量信息。
A segmental deformable model for image segmentation was presented and affine invariants were introduced into the model's energy function.
可以在同一个函数中同时使用命名参数和可变参数,只需要将可变参数的省略号放在命名参数列表之后。
Named and variadic parameters can be used in the same function, simply by placing the variadic ellipsis after the list of named parameters.
使用不可变值是一种很好的做法,因为这样做可以使代码从函数编程的一个重要方面中获益。
Using immutable values is a good practice because doing this allows your code to benefit from an important aspect of functional programming.
很多人现在都投身于函数式编程的世界,由于它们具有不可变的对象,以及与生俱来的线程安全属性。
Many people are betting on functional programming, with its emphasis on immutable objects and their inherently thread-safe properties.
最后,一个最不常用的选择是可以让函数调用可变个数的参数。
Finally, the least frequently used option is to specify that a function can be called with an arbitrary number of arguments. These arguments will be wrapped up in a tuple.
最后,一个最不常用的选择是可以让函数调用可变个数的参数。
Finally, the least frequently used option is to specify that a function can be called with an arbitrary number of arguments. These arguments will be wrapped up in a tuple.
应用推荐