Arithmetics
Arithmetic Expressions
In Wyrd, you can do simple calculations using operators:
+
for addition-
for subtraction*
for multiplication/
for division
To Do: Support remainder operator %
Precedence
When there are chained arithmetics operators, there will be evaluation precedence which follows common mathematic rule: multiplications and divisions have higher precedence than additions and subtractions.
Prioritization
You can also use parentheses to override the precedence of the operators.
The compilation result will mostly be the same as JavaScript code.
Last updated
Was this helpful?