macOS 10.12 上的
man 运算符
显示等
,这是什么,手册页错误?
OPERATOR(7) BSD Miscellaneous Information Manual OPERATOR(7)
NAME
operator -- C operator precedence and order of evaluation
DESCRIPTION
Operator Associativity
-------- -------------
() [] -> . left to right
! ~ ++ -- - (type) * & sizeof right to left
* / % left to right
+ - left to right
<< >> left to right
< <= > >= left to right
== != left to right
& left to right
^ left to right
| left to right
&& left to right
|| left to right
?: right to left
= += -= etc. right to left
, left to right
FILES
/usr/share/misc/operator
BSD June 9, 1993 BSD
最佳答案
那个you mentioned没有列出所有赋值运算符,因此它使用等
(etc == et cetera)表明这不是一份详尽的 list 。这不是一个错误,等
也不是C中的运算符/关键字(想到提及,FWIW)。
other version列出所有这些。
= += -= *= /= %= <<= >>= &= ^= |=
完整列表见章节 §6.5.16,C11
。
关于c - 运算符优先级手册页中的 `etc` 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46048745/