Documentation menu

Core Language

Operators

Standard arithmetic and comparison, plus word-based logical operators instead of symbols.

New to coding?

Copy the examples exactly first. Run them. Then change one number or word and run them again. You are not expected to memorize the command lists.

1

Arithmetic

Division always produces a float result — there's no separate integer division.

Try this code
10 + 3   // 13
10 - 3   // 7
10 * 3   // 30
10 / 3   // 3.3333333333333335
10 % 3   // 1
2

Comparison

All six return a bool.

Try this code
x == y   x != y
x <  y   x <= y
x >  y   x >= y
3

Logical

and / or / not — no symbols, short-circuit evaluation applies.

Try this code
true and false   // false
true or  false   // true
not true         // false

if x > 0 and x < 100 {
    print "in range";
}
4

String concatenation

+ joins strings; numbers auto-convert when mixed with a string via interpolation (see Strings below).

Try this code
full = "hello" + " " + "world";