CANCapture Scripting
Operator precedence

In expressions, the operator with the highest precedence is always computed first.

Unary operators

Unary operators have the higher precedence than other operators, and between unary operators the operator closest to the actual value has the highest precedence. Post-operators have higher precedence than pre-operators.

This list shows the available unary operators.

:: scope resolution operator
[] indexing operator
++ – post increment and decrement
. member access
++ – pre increment and decrement
not ! logical not
+ - unary positive and negative
~ bitwise complement
@ handle of

Binary and ternary operators

This list shows the dual and ternary operator precedence in decreasing order.

* / % multiply, divide, and modulo left to right
+ - add and subtract left to right
<< >> >>> left shift, right shift, and arithmetic right shift left to right
& bitwise and left to right
^ bitwise xor left to right
| bitwise or left to right
<= < >= > comparison left to right
== != is !is xor ^^ equality, identity, and logical exclusive or left to right
and && logical and left to right
or || logical or left to right
?: condition left to right
= += -= *= /= %= &=
|= ^= <<= >>= >>>=
assignment and compound assignments right to left