Basic type:
- Numerical
- Integral type: int int8 int16 int32 (Rune) Int64 uint Uint8 ((byte)) uint16 UInt32 UInt64 uintptr
int, uint, uintptr is 32 bits on 32-bit system, 64-bit on 64-bit system
- Float type: float32 float64
- Plural type: complex64 complex128
- String
- Boolean: True False
<font color=red >note</font>: In the IF statement, if the test condition is I >= 0, then the type I is not suitable for the UINT type (UINT data always >= 0)
Operator:
- The remainder is only used for integral type; the residue is the same as the dividend symbol, 5%3=2; -5%3=-2
- 5.0/4=1.25;5/4.0=1.25;5/4=1
- && if the expression on the left side evaluates to false, the expression on the right is not checked;& always verify expressions on both sides
- With or ^; Unary prefix ^
Aggregation type (aggregate types):
1. Arrays
2. Structure
Reference type
1. Pointers
2. Slicing, mapping
3. Functions
4.channel
Interface type: