Basic types and process controls for iOS data

Source: Internet
Author: User

The way Swift declares variables is similar to JS. Basic types are basically the same as Java, with more character types.

Let: used to declare constants;

var: used to declare variables;

Basic types are: double,float,int (numeric type), Boolean (Boolean type), character (character type), Tuple (Ganso);

At this time a friend to the tuple (Ganso) did not understand. In mathematics there is the concept of Ganso, a friend who learns the Java language knows that it actually represents a collection, a set of key-value pairs. But the meta-ancestor does not support foreach traversal because a collection can traverse primarily to see if he has implemented an interface like Ienumeralbe, and Ganso does not implement the associated interface.

Process Control statements are: For, while, repeat while; (Loop statement) if else; switch; (branch statement)

Repeat while is actually a Do While loop, the usage is the same.

In fact, there is no sense of learning is very interesting, there is java,c# Foundation will feel easy to learn. Come on! Now that you have chosen, keep learning!

Basic types and process controls for iOS data

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.