十六进制FFFFFFFF转换成十进制数据溢出的问题
我用的 double定义的进制变量.但是将十六进制FFFFFFFF转换成十进制时,返回结果却是-1,但实际结果应该是4294967295,应该是double的变量长度不够了.像这样的大数字,在pb里怎样定义变量呢?
[解决办法]
longlong
[解决办法]
Long
32-bit signed integers, from -2147483648 to +2147483647.
Using literals Use literals as for integers, but longer numbers are permitted.
LongLong
64-bit signed integers, from -9223372036854775808 to 9223372036854775807.
Using literals Use literals as for integers, but longer numbers are permitted.
UnsignedLong or ULong
32-bit unsigned integers, from 0 to 4294967295.
longlong或ulong都能满足楼主的要求。
[解决办法]
貌似pb8中确实没有 longlong。
不过pb8中却有 ulong。32为无符号,可以标识 0~4294967295