Adds or subtracts numbers. All the numbers must have no units, or the same units.
Plus cannot be used for non-numbers. Some other types:
Joins text items together in order.
This operator can also be used in match expressions, usually to match and remove items from the beginning or end of a text item (see examples, below).
This is only valid in match cases or the right-hand side of the operator ~ operator.
It specifies a pattern that a number must be close to the left-hand operator, within the tolerance specified by the right-hand side.
Tests whether two values are not-equal
Checks that all the items are equal.
Note that you can compare more than two items at once. The equals expression is true only if all the items are equal to each other.
Checks if the value on the left, matches the pattern on the right.
If there are no special patterns on the right-hand side (e.g. _, operator ±, new variables) then it is equivalent to operator =.
If you do declare a variable in the right-hand side, the variable will not be accessible outside the pattern. For that, use the full match expression.
Checks if all items are true.
The items are checked left-to-right and are not evaluated beyond the first false item. See the first example for how this is useful.
Checks if any items is true.
The items are checked left-to-right and are not evaluated beyond the first true item. See the first example for how this is useful.
Compares the values.
Note that you can chain multiple less-than and less-than-or-equals in the same expression.
The rules for different types are as follows:
Divides the left side by the right side.
This will produce a decimal component if necessary. If you want integer division, round the result.
The result will have appropriate units, dividing the top units by the bottom units.