默认值: 整型的默认值:0 浮点型的默认值:0字符串的默认值:"" //空布尔类型的默认值:false package mainimport "fmt" func main() { var a int //0 var b float32 //%f的输出是0.000000,%v的输出是0 var c float64 //%f的输出是0.000000,%v的输出是0 var isMarryied bool //false var name string //&quo…
查询,官方的解释如下: // rune is an alias for int32 and is equivalent to int32 in all ways. It is // used, by convention, to distinguish character values from integer values. //int32的别名,几乎在所有方面等同于int32 //它用来区分字符值和整数值 type rune = int32 我们通过一个简单的例子来看下rune的作用.先来看…