swift4-布尔类型
2018-08-16 本文已影响0人
Deng_1957C
//声明一个布尔类型的常量
let hasLogin = true
//声明一个值为false的常量
let hasRegister = false
//查看布尔常量的哈希值
hasLogin.hashValue
hasRegister.hashValue
//通过常量的描述属性查看布尔值转换为字符串的情况
hasLogin.description
hasRegister.description
//布尔类型不再支持YES和NO