//声明一个布尔类型的常量
let hasLogin = true
//声明一个值为false的常量
let hasRegister = false
//查看布尔常量的哈希值
hasLogin.hashValue
hasRegister.hashValue
//通过常量的描述属性查看布尔值转换为字符串的情况
hasLogin.description
hasRegister.description
//布尔类型不再支持YES和NO
//声明一个布尔类型的常量
let hasLogin = true
//声明一个值为false的常量
let hasRegister = false
//查看布尔常量的哈希值
hasLogin.hashValue
hasRegister.hashValue
//通过常量的描述属性查看布尔值转换为字符串的情况
hasLogin.description
hasRegister.description
//布尔类型不再支持YES和NO
本文标题:swift4-布尔类型
本文链接:https://www.haomeiwen.com/subject/rusobftx.html
网友评论