Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/arithmetic.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ $ echo $((2#11111111))
- `&`:位的“与”运算,对两个数字的所有位执行一个`AND`操作。
- `|`:位的“或”运算,对两个数字的所有位执行一个`OR`操作。
- `~`:位的“否”运算,对一个数字的所有位取反。
- `!`:逻辑“否”运算
- `^`:位的异或运算(exclusive or),对两个数字的所有位执行一个异或操作。

下面是右移运算符`>>`的例子。
Expand Down Expand Up @@ -225,6 +224,7 @@ $ echo $((17^3))
- `!=`:不相等
- `&&`:逻辑与
- `||`:逻辑或
- `!`:逻辑否
- `expr1?expr2:expr3`:三元条件运算符。若表达式`expr1`的计算结果为非零值(算术真),则执行表达式`expr2`,否则执行表达式`expr3`。

如果逻辑表达式为真,返回`1`,否则返回`0`。
Expand Down