正文

<005> GCC中的整型类型名 [AVR]2006-09-07 12:03:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/wentao/18354.html

分享到:

标准C的变量类型一般都适用于单片机的C语言,如char、float、double、unsigned int 等。经常使用的整型在头文件 <inttypes.h> 中作了定义。

┌──────┬──────┬──────────────┐
ㄧ   类型名   ㄧ 长度/字节  ㄧ         数值范围           ㄧ
├──────┼──────┼──────────────┤
ㄧ   int8_t   ㄧ 1( 8 bits) ㄧ        -128~127           ㄧ
├──────┼──────┼──────────────┤
ㄧ  uint8_t   ㄧ 1( 8 bits) ㄧ          0~255            ㄧ
├──────┼──────┼──────────────┤
ㄧ  int16_t   ㄧ 2(16 bits) ㄧ      -32768~32767         ㄧ
├──────┼──────┼──────────────┤
ㄧ uint16_t   ㄧ 2(16 bits) ㄧ         0~65535           ㄧ
├──────┼──────┼──────────────┤
ㄧ  int32_t   ㄧ 4(32 bits) ㄧ -2147483648~2147483647   ㄧ
├──────┼──────┼──────────────┤
ㄧ uint32_t   ㄧ 4(32 bits) ㄧ       0~4294967295        ㄧ
├──────┼──────┼──────────────┤
ㄧ  int64_t   ㄧ 8(64 bits) ㄧ -9.22×10^18~9.22×10^18  ㄧ
├──────┼──────┼──────────────┤
ㄧ uint64_t   ㄧ 8(64 bits) ㄧ     0~1.844×10^19        ㄧ
└──────┴──────┴──────────────┘


《AVR单片机与CPLD/FPGA综合应用入门》

阅读(3003) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册