Expressions can be combined using operators. Each operator as a precedence priority. Here is the list of those expression's priority.
- primary
- unary
- power
- multiplicative
- additive
- relational
- logical
These operators can do some logical comparison between other expressions:
- or, ||
- and, &&
true or false and true
The and operator has more priority than the or, thus in the example above, false and true is evaluated first.
- =, ==, !=, <>
- <, <=, >, >=
1 < 2
- +, -
1 + 2 - 3
- *, /, %
1 * 2 % 3
- & (bitwise and), | (bitwise or), ^(bitwise xor), << (left shift), >>(right shift)
2 >> 3
- !, not, -, ~ (bitwise not)
not true
- (, )
- values
2 * ( 3 + 2 )