3 ms·
There's also mixfix where the operators are interleaved between the arguments, of which there are more than two. The well-known one is C's conditional operator:
by munificent 5y ago
There's also mixfix where the operators are interleaved between the arguments, of which there are more than two. The well-known one is C's conditional operator:
a ? b : c
This is a single operation `?:` that takes operands a, b, and c.
- account42 5y agoExcept that the ternary operator in C and C++ is not really an operator but a control flow construct.
- HelloNurse 5y agoIt's an operator because it's functional (although often with side effects): three expressions go in and one expression goes out. Control flow constructs deal with statements instead.
- munificent 5y agoIt's an operator in the syntactic sense in the same way that "=", ".", and "||" are all operators.