//-----------------------------------------------------------
//常量
let age = 25 * 4
//變量
var name = "zhangsan"
name = "張三" + "hhh"
print("姓名:\(name),年齡:\(age)")
//定義多個常量
let number = "123456", score = 70, address = "徐匯區(qū)零陵路"
//定義多個變量
var height = 168, sex = "男", weight = 55
height = 166
weight = 54
print("姓名:\(name),性別:\(sex),年齡:\(age),身高:\(height),體重:\(weight)KG,學(xué)號:\(number),成績:\(score),地址:\(address)")
//類型標(biāo)注------------------------------------------------------
//常量類型標(biāo)注
let name2 : String = "李四"
//變量類型標(biāo)注
var name3 : String = ""
name3 = "李小四"
print("常量標(biāo)注==\(name2),變量標(biāo)注==\(name3)")
//32位整數(shù)范圍
print("\(UInt32.min)<32位整數(shù)范圍<\(UInt32.max)")
//8位整數(shù)范圍
print("\(UInt8.min)<32位整數(shù)范圍<\(UInt8.max)")
//類型別名--------------------------------------------------------
typealias ZhangSan = String
var name4 : ZhangSan = "張三"
var tempName = name4 + "李四"
print("name4==\(name4),tempName==\(tempName)")