Swift 2.0 Learning Note (Day5)-Identifiers and keywords I know

Source: Internet
Author: User
Tags naming convention

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.