if let name = option{ greeting = “if=====“ }else{ greeting = "else===" }
for i in 0..3{ println("i===\(i)")//只经历0,1,2三次循环 }
func sumOf(numbers:Int...) -> Int{ var sum = 0 for number in numbers{ sum += number } return sum }
func returnFifteen() -> Int{ var y = 10 func add(){ y+=5 } add() return y }
2014年06月27日
原文地址:http://blog.csdn.net/u011439689/article/details/35994589