Swift 2.0 Study Notes (Day 9)--Leave expression you try!

Source: Internet
Author: User

original articles, welcome reprint. Reprint Please specify: Dongsheng's blog

Expression AH is very important.

in Swift, there are 3 forms of expressions.

    • Do not specify a data type

var A1 = 10

    • Specifying data types

var a1:int = Ten

    • Using semicolons

var a1:int = 10; var a2:int = 20

In the swift language, a semicolon can be added without a semicolon at the end of a statement, but there is a case where a semicolon is required, that is, when multiple statements are written in one line, a semicolon is used to differentiate the statement.

For example:

var a1:int = 10; var a2:int = 20;

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

Swift 2.0 Study Notes (Day 9)--Leave expression you try!

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.