Expression evaluator operators
Expression evaluator operators include unary, multiplicative, additive, shift,
relational, equality, bitwise, and logical categories. Operators have specific
associativity and apply to defined data types.
Category | Operator | Associativity | Comments |
|---|---|---|---|
Unary | Unary minus: - Bitwise NOT: ~ Cast operator: (type) | Right to left | The cast operator (type) applies to all numeric data
types and Boolean only. |
Multiplicative | * ,/ , % | Left to right | |
Additive | + , - | Left to right | |
Shift | << , >> | Left to right | Shift and Relational operators apply to these data types:
|
Relational | < , <= , > ,
>= | Left to right | |
Equality | == , != | Left to right | Equality operators apply to these data types:
|
Bitwise AND, XOR, OR | & , ^ , | | Left to right | |
Logical AND | && | Left to right | |
Logical OR | || | Left to right |
Provide Feedback