Swift中的switch语句的类另用法:
// 强大的switch语句 var a:Int = 100 switch a { case a where a < 0: println("Negative") case a where a == 0: println("Zero") case a where a > 0: println("Positive") default: println("Unknow") }
原文地址:http://blog.csdn.net/ccpw_cn/article/details/45399687