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.