Operators in real-time sequence expressions have an order to when they execute.
The following table lists the order of precedence for operators from highest to lowest. Operators on the same line have the same precedence.
|-, !, ~, ++, and ––||Unary negation, logical not, bit complement, pre- and post-increment, pre- and post-decrement|
|*, /, %||Multiplication, division, modulus (remainder)|
|+ and –||Addition and subtraction|
|>> and <<||Arithmetic shift right and shift left|
|>, <, >=, and <=||Greater, less, greater or equal, and less or equal|
|!= and ==||Inequality and equality|
|^||Bit exclusive or|
|? :||Conditional evaluation|
|= op=||Assignment, shortcut operate and assignop can be +, –, *, /, >>, <<, &, ^, |, %, or **.|
The assignment operator = is right associative (groups right to left), as is the exponentiation operator **. All other binary operators are left associative.
<lexpr> ? <texpr>: <fexpr>is <texpr> if the logical value of <lexpr> is TRUE and <fexpr> otherwise.