Skip to content

Commit

Permalink
Update tutorial01.md: Add wiki reference for 副作用
Browse files Browse the repository at this point in the history
  • Loading branch information
imba-tjd authored Aug 31, 2018
1 parent d3bfdb6 commit 75c263a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tutorial01/tutorial01.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ C 语言的标准库含有 [`assert()`](http://en.cppreference.com/w/c/error/ass

例如上面的 `lept_parse_null()` 开始时,当前字符应该是 `'n'`,所以我们使用一个宏 `EXPECT(c, ch)` 进行断言,并跳到下一字符。

初使用断言的同学,可能会错误地把含副作用的代码放在 `assert()` 中:
初使用断言的同学,可能会错误地把含[副作用](https://en.wikipedia.org/wiki/Side_effect_(computer_science))的代码放在 `assert()` 中:

~~~c
assert(x++ == 0); /* 这是错误的! */
Expand Down

0 comments on commit 75c263a

Please sign in to comment.