Original articles, welcome reprint. Reprint Please specify: Dongsheng's Blog
When we learn languages, we learn the types of data in this language, what are the types of data in Swift? Integer, float, Boolean, character, string these types are certain, where collections, enumerations, structs, and classes are also data types in Swift. Tuples are unique in swift.
Other types we may have known or heard about. Tuples are there in swift, what is it?
It is a data structure, which is widely used in mathematics. In computer science, tuples are a basic concept in a relational database, one record in a tuple table, and each column is a field. So in the two-dimensional table, tuples are also called records.
Now using swift syntax to represent the student tuple is:
The first form of a notation
("1001", "Zhang San", 30, 90)
The second type of notation
(ID: "1001", Name: "Zhang San", English_score:30, chinese_score:90)
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 Study Notes (day 11)-Data type What's the matter?