发布于 2015-06-14 02:00:55 | 266 次阅读 | 评论: 0 | 来源: 网络整理

关键字

被保留的关键字(keywords)不允许用作标识符,除非被反引号转义,参见 标识符。

  • 用作声明的关键字:class、deinit、enum、extension、func、import、init、let、protocol、static、struct、subscript、typealias、var
  • 用作语句的关键字:break、case、continue、default、do、else、fallthrough、if、in、for、return、switch、where、while
  • 用作表达和类型的关键字:as、dynamicType、is、new、super、self、Self、Type、__COLUMN__、__FILE__、__FUNCTION__、__LINE__
  • 特定上下文中被保留的关键字:associativity、didSet、get、infix、inout、left、mutating、none、nonmutating、operator、override、postfix、precedence、prefix、right、set、unowned、unowned(safe)、unowned(unsafe)、weak、willSet,这些关键字在特定上下文之外可以被用于标识符。
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务