Integer
UInt8, Int32,Int64,UInt32,UInt64 etc
Float
Double,Float
“Double has a precision of at least 15 decimal digits, whereas the precision of Float can be as little as 6 decimal digits.”
BOOL
Bool
Boolean constant values, true and false:”
Swift’s type safety prevents non-Boolean values from being be substituted for Bool. The following example reports a compile-time error:
let i = 1
if i {
// this example will not compile, and will report an error
}”
Characters
“Each Character value represents a single Unicode character.”
0 comments:
Post a Comment