Swift 2.0 Study notes (Day5 )--The identifiers and keywords I know
original articles, welcome reprint. Reprint Please specify: Dongsheng's blog
a lot of computer language has identifiers and keywords, has not been a good summary, is such a use, now a small tidy up the Identifiers and keywords in Swift.
What is an identifier?
identifiers is the name specified by the developer for variables, constants, methods, functions, enumerations, structs, classes, protocols, and so on.
swift
-
case-sensitive, myname and myname is a two different identifier;
-
_) or a letter, but not a number;
The other characters in the identifier can be underscores (_), letters, or numbers.
For example:UserName,User_name,_sys_val, height, etc. as a valid identifier, and2mail,room#and theClassis an illegal identifier.
What is keyword > What about it?
" ) to enclose it.
swift language common keywords have the following 4 > species.
-
keywords related to declaration: class, deinit, enum ET.
-
keywords related to statements: Break, case, continue ET.
expression and type keywords: as, catch, dynamictype, false ET.
keywords used in a specific context:associativity,Convenience,Dynamicand so on.
SwiftThe keywords are case-sensitive, soClassand theClassis different, thenClassis notSwiftthe key word.
Welcome to follow Dongsheng Sina Weibo @tony_ Dongsheng.
Learn about the latest technical articles, books, tutorials and information on the public platform of the smart Jie classroom
More Products iOS, Cocos, mobile design courses please pay attention to the official website of Chi Jie classroom: http://www.zhijieketang.com
Luxgen Classroom Forum Website: http://51work6.com/forum.php
Swift 2.0 Learning Note (Day5)-Identifiers and keywords I know