Operators
Arithmetic
| Operator | Meaning |
|---|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulo |
^ | Exponentiation |
Parentheses can be used to control evaluation order:
z = -20
a = z
b = 30
c = a + b
d = c * a + b
e = d / (a + b)
println e
Comparison
Used in conditionals and conditional jumps:
| Operator | Meaning |
|---|---|
== | Equal |
!= | Not equal |
> | Greater than |
< | Less than |
>= | Greater than or equal |
<= | Less than or equal |
String concatenation
.. concatenates two values into a string:
name = 'Ryan'
text = 'Hello, ' .. name
println text
See Strings for more.