Operators
Arithmetic
| Name | Example |
|---|
| Multiplication | a * b |
| Division | a / b |
| Modulus | a % b |
| Addition | a + b |
| Subtraction | a - b |
Assignment
| Name | Example |
|---|
| Assignment | a = b |
| Multiplication | a *= b |
| Division | a /= b |
| Modulus | a %= b |
| Addition | a += b |
| Subtraction | a -= b |
Relational
| Operator | Meaning | Example |
|---|
== | Equals | foo == 32 |
!= | Not equals | foo != 32 |
> | Greater than | foo > 32 |
>= | Greater than or equals | foo >= 32 |
< | Less than | foo < 32 |
<= | Less than or equals | foo <= 32 |
&& | Logical AND | foo && bar |
|| | Logical OR | foo || bar |
Types
| Name | Example |
|---|
| Type cast | foo as bar |
| Type equality | foo is bar |
| Type retrieval | typeof(foo) |
Primary
| Name | Example |
|---|
| Member | foo.bar |
| Static member | foo::bar |
| Function call | foo(bar) |
| Static function call | foo::bar(qux) |
Unary
| Name | Example |
|---|
| Logical NOT | !foo |
| Negative | -5 |
| Positive | +5 |
| Grouping | (foo + bar) |