-
Notifications
You must be signed in to change notification settings - Fork 0
Language Specification
orbyfied edited this page Apr 7, 2023
·
3 revisions
Contains all specifications of the OneScript source code.
| Operator | ID | Tk | Syntax | Standard Behavior |
|---|---|---|---|---|
| Binary Operators | ||||
| Add | add |
+ |
a + b |
|
| Subtract | sub |
- |
a - b |
|
| Multiply | mul |
* |
a * b |
|
| Divide | div |
/ |
a / b |
|
| Modulo | mod |
% |
a % b |
|
| Power | pow |
** |
a ** b |
Raises a to the power b. |
| Increment By | inb |
+= |
a += b |
Increments a by b, returning the result. |
| Decrement By | deb |
-= |
a -= b |
Decrements a by b, returning the result. |
| Is Equal | ieq |
== |
a == b |
Checks if a is equal to b, this utilizes Java's Object.equals method on object types. |
| Is Equal Exact | iex |
=== |
a === b |
If the values are primitive, it checks if a is equal to b, for objects it checks the identity. |
| TODO |