Golang基础——类型转换和类型别名

类型转换:

 不兼容类型 :bool
 低类型——》高类型,保证数据精度
 数字类型高变低:数据溢出,符号改变。float32  可以  转 float64 ,反过来不行,会不准,位数不够

类型别名:

type bigint int64  // main.bigint
type(
    long int32
    char byte
)
posted @ 2021-03-09 21:52  pythoner_wl  阅读(134)  评论(0编辑  收藏  举报