Otherwise, if the signed integer type can represent all of the values of the unsigned type, the common type is the signed type.
否则,如果有符号整型可以表示无符号整型的值时,公共类型是有符号类型。
If the unsigned integer type has rank greater than or equal to the rank of the signed integer type, the common type is the unsigned type.
如果无符号整型的优先级高于或等于有符号类型,公共类型是无符号类型。
In most situations this does not pose a problem but for the translation of an IDL unsigned integer type whose value falls inside the number range of its highest order bit there will be a mismatch.
在多数情况下这不会发生问题,但是当一个IDL无符号整数取值正好落在最高位所限制的取值范围中时,类型转换就会发生不匹配的错误。
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 开头)。
In cases where unsigned and signed 32-bit integers are mixed in an expression and assigned to a signed long, cast one of the operands to its 64-bit type.
如果在表达式中混合使用无符号和有符号的32位整数,并将其赋值给一个有符号的long类型,那么将其中一个操作数转换成64位的类型。
These arguments are canonically of type unsigned long long, although some programs engage in mild type punning, treating them as 64-bit Pointers or other types.
这些参数按照规定都是unsignedlong long类型的,不过有些程序加入了适度的类型双关,将它们当作64位的指针或其他类型。
Untyped integral constants are of type (unsigned) int.
无类型的整数常量就是(unsigned)int类型的。
For example, a value can be cast to another type by using the type name as if it were a function. So you could cast a value to an unsigned integer using the code fragment in Listing 12.
例如,通过使用类型名称可以将一个值强制转换为另一种类型,就象是一个函数一样。
For example, suppose we have an unsigned short returning from an IDL interface. The range of this type will be from 0 to 65535.
例如,假设有一个从IDL接口返回的unsigned short类型值,这一类型的取值范围是0到65535。
Unfortunately, the Standard permits an implementation to make all of the integer types the same size, and that complicates the rules for when a signed integer type meets an unsigned integer type.
不幸的是,标准允许实现使得所有整数类型都是同样的大小,这使一个有符号整型遇到一个无符号整型时的规则变得复杂了。
If we know that the byte at location 736425 has type "unsigned 8-bit integer," then we know that the byte represents the number 112.
如果知道地址为736425的字节的类型是8位无符号整数,那么就可以知道该字节表示整数112。
Class member with an signed or unsigned integral type that specifies the number of bits to allocate to the member.
有符号或无符号整型类成员,它指定了分配给成员的位数。
If either operand is unsigned, then the type to which the operand is coerced is unsigned.
如果运算元都是不带正负号的,则强制型转其运算元的型别也是不带正负号的。
The compiler assumes the base type of the bit field to be unsigned.
编译器假定位域的基类型无符号。
The unsigned char data type, and byte data type will yield incorrect results and act as though they are signed types i. e. type char.
无符号字符数据类型和二进制数据类型将产生错误的计算结果,会当成有符号的数据类型进行计算。
The unsigned char data type, and byte data type will yield incorrect results and act as though they are signed types i. e. type char.
无符号字符数据类型和二进制数据类型将产生错误的计算结果,会当成有符号的数据类型进行计算。
应用推荐