C: Is there anything called a 'prefix expression'?

86 views Asked by At

The ISO/IEC 9899:2011 (American National Standard for C11) talks about postfix expressions, but there's nothing called a prefix expression. Why so?

1

There are 1 answers

0
Jonathan Leffler On

There's a whole syntactic category postfix expression, but the prefix operators are classified as unary operators and defined in the syntactic category unary expression, which include the prefix increment and decrement operators. Note that postfix expressions include array subscripting, function calls, and the . and -> operators, not just postfix increment and decrement.

As to why: there is no stated reason — it simply wasn't seen as a necessary name.