num := 3         // int
num := 3.        // float64
num := 3 + 4i    // complex128
num := byte('a') // byte (alias: uint8)
var u uint = 7        // uint (unsigned)
var p float32 = 22.7  // 32-bit float

#Operators

x := 5
x++
fmt.Println("x + 4 =", x + 4)
fmt.Println("x \* 4 =", x * 4) 

See: More Operators

Comments