Arithmetics - mathisi-io/t24dev GitHub Wiki
Arithmetic Operations
Arithmetic operations are done using the following operators:
- Addition:
+
- Subtraction:
-
- Multiplication:
*
- Division:
/
- Exponent (Power):
**
or^
The precedences are the same as in any other programming language: *
and /
have higher precedence than +
and -
.
You can use ( )
to override them.
x = 2 + 3 * 4 ;* x = 14
// But
y = (2 + 3) * 4 ;* y = 20