修正整数范围的内容,新增未翻译的部份

This commit is contained in:
yulin0629
2015-06-20 11:39:42 +08:00
parent 0b186bc21e
commit 247d89cf84
2 changed files with 8 additions and 6 deletions

View File

@ -197,9 +197,10 @@ Swift 提供了81632和64位的有符號和無符號整數類型。這些
你可以訪問不同整數類型的`min`和`max`屬性來獲取對應類型的最大值和最小值:
```swift
let minValue = UInt8.min // minValue 為 0是 UInt8 類型的最小值
let maxValue = UInt8.max // maxValue 為 255 UInt8 類型的最大值
let minValue = UInt8.min // minValue 為 0且是Uint8型別
let maxValue = UInt8.max // maxValue 為 255是UInt8型別
```
`min`和`max`所傳回值的型別,正是其所對應的整數型別(如上UInt8所傳回的型別為UInt8),且可用在陳述式相同型别的值旁。
### Int

View File

@ -197,9 +197,10 @@ Swift 提供了81632和64位的有符号和无符号整数类型。这些
你可以访问不同整数类型的`min`和`max`属性来获取对应类型的最大值和最小值:
```swift
let minValue = UInt8.min // minValue 为 0是 UInt8 类型的最小值
let maxValue = UInt8.max // maxValue 为 255是 UInt8 类型的最大值
let minValue = UInt8.min // minValue 为 0是 UInt8 类型
let maxValue = UInt8.max // maxValue 为 255是 UInt8 类型
```
`min`和`max`所传回值的类型,正是其所对的整数类型(如上例UInt8, 所传回的类型是UInt8),可用在表达式中相同类型值旁。
### Int