docs(operator): fixed #90

This commit is contained in:
ruanyf
2023-03-18 08:20:49 +08:00
parent a208c4733d
commit e472fefc17

View File

@@ -416,10 +416,11 @@ x = 10, y = 20;
```c
int x;
x = 1, 2, 3;
x = (1, 2, 3);
```
上面示例中,逗号的优先级低于赋值运算符,所以先执行赋值运算,再执行逗号运算,变量`x`等于`1`
上面示例中,括号里面的逗号运算符,返回最后一个表达式的值,所以变量`x`等于`3`
## 运算优先级