6
GOLANG 基本数据类型 整型
source link: https://studygolang.com/articles/7902?fr=sidebar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
GOLANG 基本数据类型 整型
zengyz · 2016-08-30 16:00:00 · 5795 次点击 · 预计阅读时间不到 1 分钟 · 大约8小时之前 开始浏览这是一个创建于 2016-08-30 16:00:00 的文章,其中的信息可能已经有所发展或是发生改变。
基本数据类型-整型
有符号(负号)
int8 int16 int32 int64
无符号(无符号)
uint8 uint16 uint32 uint64
架构特定(取决于系统位数)
int uint
Unicode字符rune类型等价int32
byte等价uint8
uintptr,无符号整型,
由系统决定占用位大小,足够存放指针即可,和C库或者系统接口交互
具体类型 取值范围
int8 -128到127
uint8 0到255
int16 -32768到32767
uint16 0到65535
int32 -2147483648到2147483647
uint32 0到4294967295
int64 -9223372036854775808到9223372036854775807
uint64 0到18446744073709551615
有疑问加站长微信联系(非本文作者)
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:701969077
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK