Skip to content

Commit 8313f77

Browse files
committed
Merge branch '1334-languageguide--the-basicsmd' of https://github.com/hdmdhr/the-swift-programming-language-in-chinese into 1334-languageguide--the-basicsmd
2 parents d3ed0be + d368bb4 commit 8313f77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

swift-6-beta.docc/LanguageGuide/TheBasics.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
处理常见数据类型并编写基本语法。
44

5-
Swift 提供了许多基本数据类型,包括表示整数的 `Int`、表示浮点数的 `Double`、表示布尔值的 `Bool` 和表示文本的 `String`。Swift 还提供了三种主要集合类型(`Array`(数组),`Set`(集合),和 `Dictionary`(字典))的强大版本,详见<doc:CollectionTypes>
5+
Swift 提供了许多基本数据类型,包括表示整数的 `Int`、表示浮点数的 `Double`、表示布尔值的 `Bool` 和表示文本的 `String`。Swift 还提供了三种主要集合类型(`Array`(数组),`Set`(集合),和 `Dictionary`(字典))的强大版本,详见 <doc:CollectionTypes>
66

77
Swift 使用变量来存储值,并通过标识名称来引用值。Swift 还广泛使用不可更改其值的变量。这些变量被称为常量,在整个 Swift 中都有使用,以便在处理无需更改的值时使代码更安全、更清晰。
88

@@ -1523,8 +1523,7 @@ assert(age >= 0)
15231523
```
15241524
-->
15251525

1526-
如果代码已经检查了条件,则使用 [`assertionFailure(_:file:line:)`](https://developer.apple.com/documentation/swift/1539616-assertionfailure) 函数来表示断言失败。
1527-
例如:
1526+
如果代码已经检查了条件,则使用 [`assertionFailure(_:file:line:)`](https://developer.apple.com/documentation/swift/1539616-assertionfailure) 函数来表示断言失败。例如:
15281527

15291528
```swift
15301529
if age > 10 {

0 commit comments

Comments
 (0)