声明变量和常量
image-20230218214453478.png- 可以在一行中声明多个变量或常量,用逗号分割
//也可定义字符串
let x = 0.0, y = 0.0, z = "123"
print("x = \(x), y = \(y), z = \(z)")
//也可定义字符串
let x = 0.0, y = 0.0, z = "123"
print("x = \(x), y = \(y), z = \(z)")
本文标题:6 Swift 变量和常量的定义
本文链接:https://www.haomeiwen.com/subject/pqoqldtx.html
网友评论