Data types appear
In programming languages, data types used to declare functions and variables, data types appear to put data into different data memory size needed, what kind of memory required on the application of what memory programming. Performance can fully utilize memory, better tyrants control program, and memory utilization.
Types of
Programming language types can be divided into the following types: Boolean, integer, character, floating-point, reference data types (such as JAVA-string, class, interface, array), etc., words Reformed turn, this period of tidy golang data types, golang there will also have these data types:
Boolean: bool declaratively 1, a statement var (keyword) b (variable name) BOOL (Type) = false (value) 2. The implicit declaration: b: = false
Digital Type: Integer: int float: float32 and float64, go language support floating-point integer, and a plurality of supports, wherein the positioning calculation using complement
Digital Type:
uint8: Unsigned integer from 2 to eight 8
uint16: unsigned 16-bit integer from 2 to 16
uint32 unsigned 32-bit integer from 2 to 32
uint64 unsigned 64-bit integer from 2 to 64
int8, int16, in32, int64 signed integer e.g. int8 -2 ~ 42 ~ 4
Other numeric types:
Similar uint8 byte
rune similar int32
uint 32 or 64
int and uint same size
uintptr unsigned integer, for storing a pointer
String types: fixed-length string of characters is linked character sequences, strings go up and linked by a single byte, byte flag using unicode utf-8 encoded string of text language go
Float:
float32: Ieee-754 32-bit floating point integer
float64: ieee-754 64-bit floating point
complex64 32 for the real and imaginary
complex128 64-bit real and imaginary
Derived Data Type: pointer type, an array type, structured type, Channel Type, function type, slice type, the type of the interface (interface), map type