-
Notifications
You must be signed in to change notification settings - Fork 0
2. Operations
OJddJO edited this page Nov 8, 2024
·
20 revisions
Note
Operations are the basic building blocks of the language. They are the smallest unit of code that can be executed. They can be combined to form expressions which can be used to perform more complex operations.
Important
Operations do follow the mathematical order of operations. To enforce a specific order of operations, use .. For example, 2 plus 3 times 4 will be evaluated as 5 * 4 = 20 then 2 + 20 = 22. To evaluate 2 + 3 first, use 2 .plus 3 times 4.
| Expression | Description |
|---|---|
a plus b |
Add a and b
|
a minus b |
Subtract b from a
|
a times b |
Multiply a and b
|
a div b |
Divide a by b
|
a mod b |
Remainder of a divided by b
|
a ediv b |
Euclidean division of a by b
|
a power b |
a raised to the power of b
|
sqrt a |
square root of a
|
a .plus b times c |
a + b times c (priority) |