chapter5: fix typos.

This commit is contained in:
Zhang Wanming
2015-07-04 15:04:08 +08:00
parent 377f88d901
commit 720d508906
2 changed files with 5 additions and 4 deletions

View File

@@ -64,9 +64,10 @@ func main() {
```
0 1 2 3 4 6 7 8 9
5 is skipped
```
5被跳过了
关键字 continue 只能被用于 for 循环中
## 链接

View File

@@ -1,6 +1,6 @@
# 5.6 标签与 goto
for、switch 或 select 语句都可以配合标签label形式的标识符使用即某一行第一个以分号结尾的单词gofmt 会将后续代码自动移至下一行)。
for、switch 或 select 语句都可以配合标签label形式的标识符使用即某一行第一个以冒号(":")结尾的单词gofmt 会将后续代码自动移至下一行)。
Listing 5.13 [for6.go](examples/chapter_5/for6.go)
@@ -97,7 +97,7 @@ fmt.Println(“A statement just after for loop.”)
```
for i := 0; i<7 ; i++ {
if i%2 == 0 { continue }
fmt.Println(“Odd:”, i)
fmt.Println(“Odd:”, i)
}
```