在声明局部变量的函数中,只有局部版本才具有意义。
Inside the function in which the local variable is declared, only the local version has meaning.
就像很多语言中声明局部变量一样,一个嵌套方法尽在方法内部可见。
Like a local variable declaration in many languages, a nested method is only visible inside the enclosing method.
声明局部变量后,子例程将遍历每个指定查询词,搜索name或jobresponsibilities散列中的变音位匹配。
After the local variable declaration, the subroutine will make a pass through every query word specified searching for a metaphone match in the name or jobresponsibilities hashes.
您可以使用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.
在局部变量、游标和临时表的声明方面,两种平台没什么差别,但在这两种平台上,声明的顺序却很重要。
There are no differences in the declarations of local variables, cursors, temporary tables, but on both platforms the order of declaration is important.
对于源代码的一项更实质性的限制是不能引用在所添加的声明或者块外声明的局部变量。
A more substantial limitation on the source code is that there's no way to refer to local variables declared outside the statement or block being added.
故名思意,“隐式类型局部变量”将无法用于域变量或常量的声明中,否则将导致编译错误。
Also as the name says, implicitly typed local variable, you cannot use var for field declaration or constant variables, therefore following declarations will both produce a compiler error.
这里的self标识符声明一个线程局部变量time。
Here the self identifier declares a thread local variable time.
这个计算器利用local语句将x声明为局部变量,只能在mycalc函数的范围内使用。
The calculator makes use of the local statement to declare x as a local variable that is available only within the scope of the mycalc function.
只需要创建一个仅包含变量名称的表达式,并为其指定一个取值,就可以声明一个局部变量。
You can declare a local variable simply by creating an expression containing only the name of the variable, and assigning a value to it.
想象一下,如果写了两个方法,每个都声明了一个局部变量,且名字一致。
Imagine writing two methods that each declare a locale variable with the exact same name.
这是对程序员关于局部变量的预期的重大变更,具体来讲,缺少了任何将此变量声明为奇怪的、新的耐久局部变量的特殊声明。
This would be a major change to programmer expectations about local variables, especially in the absence of any special declaration that this is one of those weird new long-lived local variables.
方法内部声明的变量是局部变量,在方法外部是不能够使用的。
Variables declared with a method are local to that method and cannot be used outside of it.
局部变量是一种仅能在声明该变量的代码片段中使用的变量。
A local variable is a variable that is only available for use within the snippet in which it is declared.
方法主体中声明的变量成为局部变量,它只对该方法有效,代码的其他部分均不可访问它。
Variables declared inside a method are called local variables because they are available only to that method and not to any other parts of the code.
方法内部声明的变量叫做局部变量。这儿局部的意思是什么?
Variables declared within a method are said to be local variables. What is the significance of the word local in this context?
它是可能的执行局部变量的声明?
Is it possible to enforce the declaration of local variables?
这里的代码使用了一个局部变量diff,这个局部变量只定义在这一块代码范围内,之后在构造函数中又声明了另一个相同级别的变量fill。
The code here USES a local variable diff, which is only defined within this block of code, while later in the constructor a separate variable, fill, is declared at the same level.
每个局部变量在用于其他任何类型的语句前必须出现在声明语句中。
Every local variable must appear in a declaration statement before being used in any other kind of statement.
如果该标识符是形参或局部变量,则使用自动存储声明它。
If the identifier is a formal parameter or local variable, declare it with auto storage.
当你声明一个变量,不论是一个参数,还是一个局部变量,它们只存在函数的内部。
And when you declare a variable, whether as an argument or as literally a local variable, they only live inside of that function.
在固定语句中声明的局部变量类型必须是指针类型。
The type of locals declared in a fixed statement must be a pointer type.
如果给一个局部变量或函数的参数声明的名字与某个全局变量的名字相同,那么就有效地隐藏了这个全局变量。
If you declare a local variable or function parameter with the same name as a global variable, you effectively hide the global variable.
实例方法声明一个名称与声明类型的实例字段匹配的参数或局部变量。
An instance method declares a parameter or a local variable whose name matches an instance field of the declaring type.
这就意味着在到达常数声明语句前局部常数值是未定义的,在函数中分配变量前局部变量是未定义的。
This means that the value of a local constant is undefined until the constant declaration statement is reached and that a local variable is undefined until the variable is assigned to in the function.
在一个函数里如果只声明一个全局变量而没在函数中调用它,同样会减慢速度(其程度相当于递增一个局部变量)。PHP很有可能会检查看是否存在全局变量。
Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
在一个函数里如果只声明一个全局变量而没在函数中调用它,同样会减慢速度(其程度相当于递增一个局部变量)。PHP很有可能会检查看是否存在全局变量。
Just declaring a global variable without using it in a function also slows things down (by about the same amount as incrementing a local var). PHP probably does a check to see if the global exists.
应用推荐