1.continue
作用:中止当次循环
for var i = 0;i<100;i++{
if i%10 ==0 {
continue
}
}
2.break
作用:中止循环
3.fallthrough
作用:让switch继续走下去,不中止
var description = "xx" let integerToDescibe = 5 switch integerToDescibe { case 2,3,5: description += "AA" fallthrough default: description += "bb" } print(description) }
4.return
作用:用在函数内部,中止
原文:http://my.oschina.net/u/2346786/blog/523106