//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" // 数值类型转换 let three = 3 let PI = Double(three) + 0.1415926 // 两个类型不相同的数值不能进行基础运算,所以进行数值类型转换 // 类型别名(typealias) typealias NSInterger = Int var number…
1.类型别名 示例: package main //必须有一个main包 import "fmt" func main() { //给int64起一个别名叫bigint type bigint int64 var a bigint // 等价于var a int64 fmt.Printf("a type is %T\n", a) //多个一起改别名 type ( long int64 char byte ) var b long = 11 var ch char =…