C51 Data Type

From ElectroDragon Wiki
  • UINT8 = uint8 = uint_8 = 0~255
  • UINT16 = uint16 = uint_16 = 意思是16位整数(16bit integer),相当于short 占2个字节 -32768 ~ 32767

整型范围

  • Int8 - [-128:127]
  • Int16 - [-32768:32767]
  • Int32 - [-2147483648:2147483647]
  • Int64 - [-9223372036854775808:9223372036854775807]

无符号整型范围

  • UInt8 - [0:255]
  • UInt16 - [0:65535] = short
  • UInt32 - [0:4294967295] = long
  • UInt64 - [0:18446744073709551615]


Printf

  • "%ld" = uint32_t
  • "%lld" = uint64_t