correct the wrong '3'

This commit is contained in:
numbbbbb
2014-06-08 21:52:08 +08:00
parent 24693abada
commit 51ce2dd375
42 changed files with 65 additions and 65 deletions

View File

@ -284,7 +284,7 @@ Swift 是类型安全的,会在编译你的代码时进行类型检查,如
let integerPi = Int(pi)
// integerPi 等于 3所以被推测为 Int 类型
当用这种方式来初始化一个新的整数值时,浮点值会被截断。也就是说`4.75`会变成`4``-3.9`会变成`3`
当用这种方式来初始化一个新的整数值时,浮点值会被截断。也就是说`4.75`会变成`4``-3.9`会变成`-3`
> 注意:结合数字类常量和变量不同于结合数字类原始值。原始值`3`可以直接和原始值`0.14159`相加,因为数字原始值本身没有明确的类型。它们的类型只在编译器需要求值的时候被推测。