Go中的整数类型

2018-12-02  本文已影响0人  太公赢
Type Range Storage
int8 –128 to 127 8-bit (one byte)
uint8 0 to 255 8-bit (one byte)
int16 –32,768 to 32,767 16-bit (two bytes)
uint16 0 to 65535 16-bit (two bytes)
int32 –2,147,483,648 to 2,147,483,647 32-bit (four bytes)
uint32 0 to 4,294,967,295 32-bit (four bytes)
int64 –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 64-bit (eight bytes)
uint64 0 to 18,446,744,073,709,551,615 64-bit (eight bytes)
上一篇 下一篇

猜你喜欢

热点阅读