You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: source/chapter2/04_Collection_Types.md
+16-26
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
> 翻译:zqp
2
-
> 校对:shinyzhu
1
+
> 翻译:zqp
2
+
> 校对:shinyzhu, stanzhai
3
3
4
4
# 集合类型 (Collection Types)
5
5
-----------------
@@ -14,7 +14,7 @@ Swift 语言提供经典的数组和字典两种集合类型来存储集合数
14
14
15
15
Swift 语言里的数组和字典中存储的数据值类型必须明确。 这意味着我们不能把不正确的数据类型插入其中。 同时这也说明我们完全可以对获取出的值类型非常自信。 Swift 对显式类型集合的使用确保了我们的代码对工作所需要的类型非常清楚,也让我们在开发中可以早早地找到任何的类型不匹配错误。
16
16
17
-
> 注意:
17
+
> 注意:
18
18
Swift 的数组结构在被声明成常量和变量或者被传入函数与方法中时会相对于其他类型展现出不同的特性。 获取更多信息请参见[集合的可变性](#mutability_of_collections)与[集合在赋值和复制中的行为](09_Classes_and_Structures.html#assignment_and_copy_behavior_for_collection_types)章节。
19
19
20
20
<aname="arrays"></a>
@@ -44,8 +44,8 @@ var shoppingList: String[] = ["Eggs", "Milk"]
0 commit comments