go语言基本类型

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zxkr777/article/details/82146909
/*

 * basic types

 */

typedef signed char             int8;

typedef unsigned char           uint8;

typedef signed short            int16;

typedef unsigned short          uint16;

typedef signed int              int32;

typedef unsigned int            uint32;

typedef signed long long int    int64;

typedef unsigned long long int  uint64;

typedef float                   float32;

typedef double                  float64;

 

#ifdef _64BIT

typedef uint64          uintptr;

typedef int64           intptr;

typedef int64           intgo; // Go's int

typedef uint64          uintgo; // Go's uint

#else

typedef uint32          uintptr;

typedef int32           intptr;

typedef int32           intgo; // Go's int

typedef uint32          uintgo; // Go's uint

#endif

 

/*

 * defined types

 */

typedef uint8           bool;

typedef uint8           byte;

猜你喜欢

转载自blog.csdn.net/zxkr777/article/details/82146909
今日推荐