用于描述函数作用域和函数内嵌套的作用域的术语。
Term used to describe function scope and the scopes nested inside a function.
仔细检查函数中所有使用的变量,如果有一个变量不是当前作用域定义的,而且使用了不止一次,那么我们就应该把这个变量保存在局部变量中,而使用这个局部变量来进行读写操作。
Watch the variables being used in a function. If you notice a function using an out-of-scope variable more than once, store it in a local variable and use that instead.
静态函数与静态属性一样,作用域也是类而非该类的对象实例。
Static functions, like static properties, are scoped to the class rather than to object instances of that class.
这个闭合的作用域是将闭包同调用函数和定义它的代码联系起来的纽带。
This closed scope is the communication that ties the closure to the calling function and the code that defines it.
一个闭包封闭了这些引用,所以函数调用可以安全的引用这些变量,即使它们已经超出了函数的作用域。
A closure "closes around" these references, so the function invocation can safely refer to the variables even when the variables have gone out of scope!
定义代码块的环境的名称空间和使用它的函数之间的作用域本质上是一个作用域:该作用域是闭合的。
The scope between the name space of the environment that defines the code block and the function that USES it are essentially one scope: the scope is closed.
人们也可以预先自定义一些迭代器,在函数的整个作用域内创建并使用。
One could also foresee custom iterators being created and used entirely within the scope of a function.
闭包是具有闭合作用域的匿名函数。
首先将函数对象[[scope]]内部属性中的对象,按顺序复制到作用域链中。
The objects in the function object's [[scope]] property are copied into the scope chain in the same order.
每个函数对象都有一个叫做[[scope]]的内部属性,这个内部属性包含创建函数时的作用域信息。
Each function object has an internal property called [[scope]] that is initialized with information about the scope in which the function was created.
通常情况下,局部作用域引用当前函数的局部名字。
Usually the local scope references the local names of the (textually) current function.
广义支持函数是平面凸域的一个非常重要的概念,它在讨论凸域的包含测度问题中起关键的作用。
Generalized support function is a very important concept in plane convex sets, it play a crucial role in discuss kinematic measure of convex sets.
讨论了在静电场作用下,双势阱分子中波函数随外加静电场定域的动态过程,以及能级裂距与外加静电场的关系。
In this paper we investigate the dynamic process of the localized wave function in double_well molecules using dc electric field and the relation between energy splitting and dc electric field.
但为了解释作用域与重载的相互作用,我们将违反上述规则而使用局部函数声明。
To explain how scope interacts with overloading we will violate this practice and use a local function declaration.
在函数之外,局部作用域引用全局作用域相同的名字空间:模块的名字空间。
Outside functions the local scope references the same namespace as the global scope: the module's namespace.
是一个析构函数当对象超出作用域称为?
如果要简短的描述作用域链的重点,作用域链大多与内部函数有关。
If to describe briefly and showing the main point, a scope chain is mostly related with inner functions.
在函数之外,局部作用域与全局使用域引用同一命名空间:模块命名空间。
Outside functions, the local scope references the same namespace as the global scope: the module's namespace.
在函数之外,局部作用域与全局使用域引用同一命名空间:模块命名空间。
Outside of functions, the local scope references the same namespace as the global scope: the module's namespace.
如果不涉及到内嵌函数,这个作用域链是唯一引用到调用对象的。
When no nested functions are involved, the scope chain is the only reference to the call object.
然而之所以这些结果会出其不意,是因为你会以为局部作用域会在定义它的函数退出时也不再存在了。
The reason that these results are surprising, however, is that you expect local scopes to cease to exist when the function that defines them exits.
第4章介绍函数和程序结构—外部变量、作用域规则和多个源文件等,并涉及到预处理器。
Chapter 4 covers functions and program structure - external variables, scope rules, multiple source files, and so on - and also touches on the preprocessor.
这段代码执行的结果会跟你所期望的遵循词法作用域规则的程序运行的完全一样:一个函数在它所被定义的作用域中执行。
The results of this code are exactly what you would expect from a strict application of the lexical scoping rule: a function is executed in the scope in which it was defined.
如果内嵌函数调用时的作用域就是它们定义时所处的词法作用域,那就很好理解了。
Nested functions are perfectly understandable when they are invoked in the same lexical scope in which they are defined.
一般,得到工作于名字空间、函数、类作用域的优秀的静态断言要比多使用一个难看的宏要值得。
The general conclusion was that the good of a static assert working at namespace, function, and class scope outweighed the ugliness of a macro.
在函数中局部声明的名字将屏蔽在全局作用域(第2.3.6节)内声明的同名名字。
A name declared local to a function hides the same name declared in the global scope (Section 2.3.6, p. 54).
函数的解析环域在幂级数展式中起着非常重要的作用,文章给出了确定函数解析环域的具体方法。
The analytic ring field plays an important role in the power expansion of analytic functions. In this paper the author presents a method for identifying the analytic ring field of analytic functions.
但如果你在全局作用域上保存了对内嵌函数的引用,事情就不一样了。
Things are different if you save a reference to the nested function in the global scope.
但如果你在全局作用域上保存了对内嵌函数的引用,事情就不一样了。
Things are different if you save a reference to the nested function in the global scope.
应用推荐