c - 运算符优先级手册页中的 `etc` 是什么?

标签 c operators

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/

相关文章:

c - 以编程方式递归地创建目录

c - C 中的全局变量数组

java - 不应用 Java 中运算符的优先级

c - 我该如何解决以下代码?

javascript - 为什么下面的比较输出 false?

在c中将监听更改为非阻塞模式

c - 无法找到过程入口点 fclose

c++ - 为什么转换不适用于 C++ 中的自定义运算符?

python - Python 3.2 中字符串的 'or' 运算符出现问题

c - 使用 switch case,默认部分出错