2020-06-21 18:03:45 +02:00
|
|
|
Operators
|
|
|
|
=========
|
|
|
|
|
|
|
|
{{#include ../links.md}}
|
|
|
|
|
2020-07-05 11:41:45 +02:00
|
|
|
| Operator | Description | Binary? | Binding direction |
|
|
|
|
| :---------------: | ------------------------------ | :-----: | :---------------: |
|
|
|
|
| `+` | Add | Yes | Left |
|
|
|
|
| `-` | Subtract, Minus | Yes/No | Left |
|
|
|
|
| `*` | Multiply | Yes | Left |
|
|
|
|
| `/` | Divide | Yes | Left |
|
|
|
|
| `%` | Modulo | Yes | Left |
|
|
|
|
| `~` | Power | Yes | Left |
|
|
|
|
| `>>` | Right bit-shift | Yes | Left |
|
|
|
|
| `<<` | Left bit-shift | Yes | Left |
|
|
|
|
| `&` | Bit-wise _And_, Boolean _And_ | Yes | Left |
|
|
|
|
| <code>\|</code> | Bit-wise _Or_, Boolean _Or_ | Yes | Left |
|
|
|
|
| `^` | Bit-wise _Xor_ | Yes | Left |
|
|
|
|
| `==` | Equals to | Yes | Left |
|
|
|
|
| `~=` | Not equals to | Yes | Left |
|
|
|
|
| `>` | Greater than | Yes | Left |
|
|
|
|
| `>=` | Greater than or equals to | Yes | Left |
|
|
|
|
| `<` | Less than | Yes | Left |
|
|
|
|
| `<=` | Less than or equals to | Yes | Left |
|
|
|
|
| `>=` | Greater than or equals to | Yes | Left |
|
|
|
|
| `&&` | Boolean _And_ (short-circuits) | Yes | Left |
|
|
|
|
| <code>\|\|</code> | Boolean _Or_ (short-circuits) | Yes | Left |
|
|
|
|
| `!` | Boolean _Not_ | No | Left |
|
|
|
|
| `[` .. `]` | Indexing | Yes | Right |
|
|
|
|
| `.` | Property access, Method call | Yes | Right |
|