摘要:
枚举的基本用法 enum Direction { case north case south case east case west } enum Direction { case north, south, east, west } var dir = Direction.west dir = D 阅读全文
摘要:
函数 func pi() -> Double{ return 3.14 } func sum(v1: Int, v2: Int) -> Int { return v1 + v2 } sum(v1: 10, v2: 20) 形参默认是let,也只能是let 无返回值 func sayHello() - 阅读全文