Use the type of the variable to which it is being assigned (call this simple).
使用正在被赋值的变量的类型(称为简单架构)。
The compiler infers the type of the variable from the type of the initialization expression.
编译器将通过初始化表达式的类型推断出变量的类型。
OK. So if we have variables, one of the questions we can ask is, what's the type of the variable.
好,如果我们有了一个变量,我们要问的问题之一就是,这个变量的类型是什么?
This is useful when the return value has a complex type because the type of the variable is automatically generated.
当返回值的类型很复杂时,这个重构将很有用,因为变量的类型是自动生成的。
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.
您可以使用function关键字开始函数的声明,使用var关键字来声明局部变量(这与全局变量不同),但是不用包括正在声明的变量的类型。
Thus, by declaring the variables with this type, you can directly assign the result of a constructor call to the corresponding variable.
这样,通过声明这种类型的变量,可以直接把构造函数调用的结果分配给对应的变量。
Comparing a variable having an atomic value (number, Boolean, or string) to another such variable or a literal atomic value, and expecting the type of one to be cast automatically to the other type.
把包含原子值(数字、布尔值或字符串)的变量和另一个此类变量或者文字原子值比较,希望一种类型自动转换成另一种类型。
As we described in the previous section, a statically typed language binds the type to a variable for the lifetime of that variable.
正如我们在前面的章节所描述的,一个静态类型的语言在一个变量的生命周期内都会绑定一个类型。
In contrast dynamically typed languages bind the type to the actual value referenced by a variable, meaning that the type of a variable can change along with the value it references.
相反的,动态类型的语言则是根据变量所引用的值来绑定类型,这意味着变量的类型可以随着它引用的值改变而改变。
Items in the constant pool are variable length, with the first byte of each item identifying the type of item and how it should be decoded.
常量池中各项的长度是可变的,每项的第一个字节标识项的类型以及对它解码的方式。
This subinterface provides information about array types, where the component type of the array is either parameterized or a type variable.
这个子接口提供了关于数组类型的信息,数组的组件类型可以是参数化的,也可以是一个类型变量。
You'll also want to turn on the new Option infer feature. This allows the compiler to infer local variable type declarations by evaluating the right-hand side of the expression.
你也希望根据那些特性打开新的推断特性的选项,这允许编译器通过估计右值表达式去推测出局部变量的申明类型。
A new local variable of the same type as the method's return value is created for you.
系统将为您创建与该方法的返回值类型相同的新局部变量。
This interface gives the details of a variable that represents a parameter type (such as the variable "d" within this type name).
这个接口给出了表示一个参数类型的变量(如这个类型名中变量“D ”)的细节。
The field and method signatures from Listing 2 make use of the same type of variable format as seen in the superinterface signature, but aside from that, they don't show anything new.
清单2 中的字段和方法签名利用了与超接口签名相同的变量格式类型,其他都与前面介绍的内容相同。
GCC permits the identification of a type through the reference to a variable.
GCC允许通过变量的引用识别类型。
And the only thing that's differing is the name of the type and the name of the variable I'm using.
其中唯一的区别是数据类型的名字,和我使用的变量名字。
There are lots of flavors of this, but the basic idea is that you put a tag at the beginning of a variable name saying what type it is. (So all unsigned long variables begin with ul, etc.)
其种类很多,但基本的理念是在变量名的开始添加一个标记以表示其类型(例如,所有无符号长型变量都以ul 开头)。
To this snippet we want to add support for the 4th type of logon data, the trusted environment variable, in this example REMOTE_USER.
我们希望在这段代码中添加对第四类登录数据(可信的环境变量,在此示例中是REMOTE_USER)的支持。
For these and many other reasons, monthly power fees often vary by the type of power connection rather than by the variable kWh.
因为这个原因以及其他的一些原因,月电费经常会随电力连接的类型而变,而不是随耗电量(kWh)变化。
As an example, Listing 6 shows what happens when I change the type of the local variable used for the method start time in the interceptor code from long to int.
作为一个例子,清单6展示了在将方法开始时的拦截器代码所使用的局部变量的类型从long变为int时的情况。
To fetch elements from the collection, you had to know the type of object in the collection so you could cast it back to the appropriate local variable.
要从集合中提取元素,您必须知道集合中对象的类型,以将其强制转换为合适的局部变量。
In Listing 5, the test does not need to compare to a string because the variable returns a Boolean type rather than an RTF as a result of the select attribute.
在清单5中,测试不需要与字符串进行比较,因为变量返回一个Boolean类型而不是rtf作为select属性的结果。
The second field, of type StaticLocalInitFlag, assists in initializing the variable I correctly the first time the method executes on each instance of class Foo.
第二个字段的类型为StaticLocalInitFlag,它在针对foo类的每个实例第一次执行方法时协助正确初始化变量i。
This is why the value of the name attribute of the first <wsdl:message> tag (ProductionOrderMessage) in Listing 2 matches the data type of the first variable defined in Listing 1.
所以,清单2中的第一个 <wsdl:message>标记(ProductionOrderMessage)的name属性的值与在 清单1中定义的第一个变量的数据类型相匹配。
The DemoScript.js file (shown in Listing 3) contains a function named printType(), which is used to output the type of each script variable.
js文件(如清单3 所示)包含一个printType() 函数,该函数可用来输出每个脚本变量的类型。
The alignment is always the same as the type size; that is, a variable of type int is four bytes long and will be stored at a 4-byte boundary.
排列的方式通常和类型的大小保持一致;例如,int类型的一个变量的长度是4字节,因此要将它存储在4字节区域。
The ActivityStreamsEntry class also includes simple helper methods for adding an author, objects, and verbs to the entry, ensuring the proper variable type of these values.
activitystreamsentry类也包括了用于给项添加作者、对象和动词的简单帮助器方法,可以保证这些值的变量类型是正确的。
As noted in the discussion of the Add2Integers program in Chapter 2, you must explicitly specify the data type of each variable when you introduce it into a program.
正如第二章中的Add2Integers这个程序里讨论的,你需要在把每个变量引入程序的时候明确指出它的数据类型。
As noted in the discussion of the Add2Integers program in Chapter 2, you must explicitly specify the data type of each variable when you introduce it into a program.
正如第二章中的Add2Integers这个程序里讨论的,你需要在把每个变量引入程序的时候明确指出它的数据类型。
应用推荐