basic data types golang

1, int.

A total of 11 kinds of int type:

int (compiler and related hardware platform, 32, or 64)

int8=byte

int16

int32 = rune

int64

-----

uint (compiler and related hardware platform, 32, or 64)

uint8

uint16

uint32

uint64

UIntPtr (receiving pointer)

Two identical integer type can use the following binary comparison operators are compared; the comparison result of the expression is a Boolean type. ( 6 kinds of comparison operation )

==    等于
!=    不等于
<     小于
<=    小于等于
>     大于
>=    大于等于


Go language also provides the following bit manipulation bit operator, the operator first four operations not distinguish between signed or unsigned :( six kinds of bit operation )

&      位运算 AND
|      位运算 OR
^      位运算 XOR
&^     位清空 (AND NOT)
<<     左移
>>     右移

 

Guess you like

Origin www.cnblogs.com/igoodful/p/11239338.html