package main
import "fmt"
func main() {
var v1 = 123
fmt.Printf( "v1的类型%T\n", v1)
var v2 int= 123
fmt.Printf( "v2的类型%T\n", v2)
var v3 = 123.0
fmt.Printf( "v3的类型%T\n", v3)
var v4 float32= 123.0
fmt.Printf( "v4的类型%T\n", v4)
var v5 = "你妹"
fmt.Printf( "v5的类型%T\n", v5)
var v6 = '俏'
fmt.Printf( "v6的类型%T\n",v6)
fmt.Printf( "v6的值是%v\n",v6)
fmt.Printf( "v6的类型%c\n",v6)
fmt.Printf( "20431的值是%c\n",20431)
var v7 = (100==(40+60))
fmt.Printf("v7的类型是%T,值是%v\n",v7,v7)
var v8 = ('俏'==20431)
fmt.Printf("20431的字符形式是%c\n",v8,v8)
fmt.Printf("俏的数字形式是%d\n",'俏' )
fmt.Printf("俏在字符集(utf8)中的序号是%d\n",'俏')
}
网友评论