One. Numeric type
1. Integer
1.1 unsigned integers: types that begin with u, representing positive integers and 0, Uint8,uint16,uint32,uint64
1.2 Signed integers: Int8,int16,int32,int64
1.3 According to the operating system Adaptive data type: Uint,int,intptr ( This is a common type )
For 32-bit systems
Uint=uint32 Int=int32
UIntPtr is a 32-bit pointer to a 64-bit system
Uint=uint64 Int=int64
UIntPtr is a 64-bit pointer
2. Floating-point numbers: According to the number of decimal points followed by
2.1 Single-precision floating-point number: float32
2.2 Double-precision floating-point number: float64
3. Imaginary numbers:
3.1 complex64
3.2 complex128
Two. String: (String)
(i) A number of important concepts
1. Use (double quotes "") or (') to describe
2. The escape character between the double quotes is escaped, and the escape character between the ' sign remains intact.
3. Consists of a single byte: A python-like list that can be manipulated with an index
(b) Operation of the string:
1. Ask for length
2. Get a character with an index
3. String merging
Three. Boolean type: (BOOL)
1. True/false
2. With: and/&&
Or: OR/| |
Non: NOT/!
3. None of the following can be used as a Boolean judgment after if. Null value: Nil 0 value: 0 null value: ""
Go data type