Swift 2.0 Study Notes (Day 11)-What about data types ?, Swift Study Notes

Source: Internet
Author: User

Swift 2.0 Study Notes (Day 11)-What about data types ?, Swift Study Notes

For Original Articles, please reprint them. Reprinted Please note: Guan Dongsheng's blog

When we learn a language, we will learn the Data Type of this language. What types of data are available in Swift? Integer, floating point, Boolean, character, and string types are certain. The set, enumeration, struct, and class are also the data types in Swift. Tuples are unique in Swift.

Other types we may have known or heard about. Tuples exist in Swift. What is it?

It is a data structure and is widely used in mathematics. In computer science, tuples are basic concepts in relational databases. A record in a tuples table is a field in each column. Therefore, in the orders table, tuples are also called records.

Now, the Swift syntax indicates that the Student tuples are:

First Writing Method

("1001", "Zhang San", 30, 90)

Method 2

(Id: "1001", name: "Zhang San", english_score: 30, chinese_score: 90)

 


Welcome to Guan Dongsheng Sina Weibo @ tony _ Guan Dongsheng.

Follow the public platform of Zhijie classroom to learn about the latest technical articles, books, and tutorials.

More boutique iOS, Cocos, mobile design courses please pay attention to the official site of Zhijie classroom: http://www.zhijieketang.com

Zhijie classroom Forum website: http://51work6.com/forum.php

 

 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.