Operator precedence

Below is the table of operator precedence.

The higher an operator is in the table, the earlier it is evaluated.

Group Operators Comments

Method calls, struct member access

.

Postfix unary

? []

Prefix unary

@ * ! ~ -

Bitwise

<< >>

Not yet supported.

&

^

|

Arithmetic

* / %

* Preceded by bitwise operators starting
from next major Cairo version (3).

See discussion.

+ -

Comparison

== != < <= > >=

Logical

&&

||

Assignment

= += -= *= /= %=

<<= >>= &= ^= |=

Second line not yet supported.