rhai/doc/src/appendix/operators.md

31 lines
1.6 KiB
Markdown
Raw Normal View History

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