它包含全局变量和函数的定义。
This includes the definition of global variables and functions.
函数可在另一个函数内定义,还可赋给全局变量或作为结果返回。
Functions can be defined within another function and assigned to global variables or returned as results.
G:该选项将生成查找表并将其作为静态全局变量,而不是在查找函数内生成以隐藏该表(默认行为)。
G: This option generates the lookup table as a static global variable rather than hiding it by generating it inside the lookup function (the default behavior).
在对函数和数据类型使用全局变量时,必要时可以使用保守的绑定语义。
Conservative binding semantics exist for global variables as they do for functions and data types whenever necessary.
在代码部分,定义了一个函数地址,方法同上述定义全局变量的相同——只需在它们的名称之后跟上一个冒号。
In the code section, you define a function's address the same way you defined addresses for global variables above — just put their name followed by a colon.
如果一个函数要频繁的使用全局变量,我们可以使用局部变量,作为全局变量的拷贝,这样就可以使用寄存器了。
If a function USES global variables heavily, it is beneficial to copy those global variables into local variables so that they can be assigned to registers.
现在您已经设置了所需的全局变量和函数,样式表的核心就显得简单优雅,如清单14所示。
Now that you've set up the global variables and functions that you need, the heart of the stylesheet is simple and elegant, as you can see in Listing 14.
许多脚本引擎在eval()调用之间维持全局变量和函数的状态。
Many script engines maintain state of global variables and functions between calls to eval().
通过使用 sys_nerr全局变量和strerror()函数,将可以很轻松地快速编写一些代码(请参见清单5)以打印出系统的所有内置错误消息。
Using the sys_nerr global variable and the strerror() function, you can easily whip up some code (see Listing 5) to print out all of the built-in error messages of the system.
在出现问题时,opendir()和readdir()函数都会返回NULL,并且将设置全局变量 errno 的值,以指出所出现的错误。
The opendir() and readdir() functions both return NULL if a problem occurs and the errno global variable is set to indicate what went wrong.
然后,lua_setglobal函数将栈顶的值赋给一个有名称的全局变量。
The lua_setglobal function then assigns the top value on the stack to a named global variable.
函数返回特定值(或值范围)以指明错误,且设置全局变量errno以指明问题的起因。
The function returns a specific value (or range of values) to indicate an error, and the global variable errno is set to indicate the cause of the problem.
此视图由主页(dxl. html)处理;它还具有helper函数以及用于维护信息的全局变量。
The view is handled by the main Web page (dxl.html); it also has helper functions and global variables for maintaining information. The primary view components are.
引出标准错误描述的perror和strerror函数来自sys_errlist全局变量。
The perror and strerror functions that pull standard error descriptions come from the global variable, sys_errlist.
默认情况下,变量的范围是变量第一次被分配到的函数的内部,如果它的第一次分配出现在任何函数的外部,那么它就是全局变量。
By default, a variable is scoped to the function in which it is first assigned to, or is global if its first assignment occurs outside any function.
请注意,如果函数、方法、触发器或视图中引用了某个全局变量,则不能删除该变量。
Please note that the global variable cannot be dropped if it is referenced in a function, method, trigger or view.
第一个问题是您需要在测试中考虑所有这些全局变量,保证给它们设置了函数可接受的有效值。
The first issue is that you need to account for each of them in your test, making sure you set them to valid values that the function expects.
可重入函数要么使用本地变量,要么在使用全局变量时保护自己的数据。
Reentrant functions either use local variables or protect their data when global variables are used.
当在函数或其它地方引用一个全局变量时,脚本引擎需要搜索整个全局命名空间。
Also when a global variable is referenced inside a function or another scope, the script engine has to search through the whole scope to find it.
全局变量不会被分配在寄存器上,修改全局变量需要通过指针或者调用函数的方式间接进行。
Global variables are never allocated to registers. Global variables can be changed by assigning them indirectly using a pointer, or by a function call.
除了定制过滤器,您还可以添加定制函数和注册全局变量。
Along with custom filters, you can also add custom functions and register global variables.
一旦程序可以工作了,就检查一下全局变量与使用它们的函数之间的关系。
Once you get the program working, look for associations between global variables and the functions that use them.
您可以使用function关键字开始函数的声明,使用var关键字来声明局部变量(这与全局变量不同),但是不用包括正在声明的变量的类型。
You use the function keyword to denote the start of a function and the var keyword to declare local (as opposed to global) variables, but you do not include the type of the variable being declared.
一个扩展可以定义标签、过滤器、测试、操作、全局变量、函数和节点访问等。
An extension can define tags, filters, tests, operators, global variables, functions, and node visitors.
如果你想给全局变量重新赋值,结果会很意外。下面的例子中,本来是想要追踪确定函数是否被调用了。
If you try to reassign a global variable, you might be surprised. The following example is supposed to keep track of whether the function has been called.
exists函数确定是否定义了一个具有由字符串定义的名称的变量(在本例中为全局变量g: syntax_on)。
The exists function determines whether a variable with the name specified by the string (in this case, the global variable g: syntax_on) has been defined.
先开始写一些函数来读去和写入全局变量(在必要的情况下)。
Start by writing functions that read and write global variables (when necessary).
在主函数中的变量也叫全局变量,因为所有函数都可以访问这些变量。
Variables in __main__ are sometimes called global because they can be accessed from any function.
全局变量:函数外定义的变量。全局变量能被所有函数来读取使用。
A variable defined outside a function. Global variables can be accessed from any function.
全局变量:函数外定义的变量。全局变量能被所有函数来读取使用。
A variable defined outside a function. Global variables can be accessed from any function.
应用推荐