在多数情况下这不会发生问题,但是当一个IDL无符号整数取值正好落在最高位所限制的取值范围中时,类型转换就会发生不匹配的错误。
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.
所有这些整数类型都有相应的无符号数类型。
All these integer types also have corresponding unsigned types.
EXI引入了数据类型,比如二进制、布尔值、小数、浮点数、整数、无符号整数,以及日期-时间。
EXI introduces data types such as Binary, Boolean, Decimal, Float, Integer, Unsigned Integer, and Date-Time.
如果在表达式中混合使用无符号和有符号的32位整数,并将其赋值给一个有符号的long类型,那么将其中一个操作数转换成64位的类型。
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.
不幸的是,标准允许实现使得所有整数类型都是同样的大小,这使一个有符号整型遇到一个无符号整型时的规则变得复杂了。
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.
如果知道地址为736425的字节的类型是8位无符号整数,那么就可以知道该字节表示整数112。
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。
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.
应用推荐