Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Operators

Arithmetic

OperatorMeaning
+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:

OperatorMeaning
==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.