A reference type is the passing of its own data when assigning or passing a parameter pair to a function, so that during the invocation of the function, the original data is affected and the class belongs to the reference type
1. Integral type:
Int8: Signed 8-bit integer type;
Int16: Signed 16-bit integer
Int32:
Int64:
INT: Platform-related signed integer
UInt8: Unsigned 8-bit integer
UInt16: Unsigned 16-bit integer
UInt32:
UInt64:
UINT: Platform-dependent unsigned integer
2, floating-point type
Float
Double:
How numbers are represented:
Assign a decimal, binary, hexadecimal to an integer variable, and they are represented as follows,
(1) Binary number: 0b bit prefix, 0 is Arabic numerals, B is English lowercase letters, can not be capitalized;
(28 binary: prefix 0o, 0 is Arabic numerals, 0 is English lowercase letters;
(3) 16 binary: prefix 0x, 0 is Arabic numerals
Conversions between numeric types:
(1) Conversion between integral types;
UInt8 (Var)
(2) Conversion between integral type and floating point;
Float (Var)
3. Boolean type
True
False
4, Character type
5, meta-group:
A tuple is a concept in a relational database, a table in which each row of data is a tuple, and each column is an attribute, and a tuple becomes a record in a two-dimensional table.
var stu0= ("Tony", "100", "1")
var stu1= ("name": "Tony", "id": "+", sex:1)
println (stu0.0)
println (Stu1.name)
Let (name,id,sex) =stu1
Let (name,id,_) =stu1
println (name)
println (ID)
println (Sex)
6. Collection
7. Enumeration
8. Structural Body
This article is from the "Ordinary Road" blog, please be sure to keep this source http://linjohn.blog.51cto.com/1026193/1619369
Data types for Swift