Below is a list of operators priority. At the top are operators with higher precedence.
Operator | Description | Sample |
( ) | parentheses for grouping an expression | (1+3)*4 |
- + # & | unary minus and plus, and operators for changing the base (radix) | -10 |
^ | powering | 3^2 |
* / | multiplication and division | 10*20 |
without an operator | short form of multiplication (only if the second argument is a variable or function, the same priority as a normal multiplication) | 3y |
+ - | addition and subtraction | 10-30 |
== != < > <= >= | comparative operators | 4<5 |
&& | logical and | 3>2 && 3<10 |
|| | logical or | 3>2 || 3<10 |