Skip to content

Basic Expressions

42 // Number
"hello" // String
true // Boolean true
false // Boolean false
nil // Nil value
...
1 + 2 // Addition
3 - 4 // Subtraction
5 * 6 // Multiplication
7 / 8 // Division
9 % 2 // Modulus
2 ** 8 // Exponentiation
true && false
true || false
!true
a < b
a > b
a <= b
a >= b
a == b
a != b
a | b // OR
a ^ b // XOR
a & b // AND
a << b // Left shift
a >> b // Right shift
~a // Bitwise NOT
"foo" .. "bar"
-a // Negation
!a // Logical not
~a // Bitwise not
#a // Length
(a + b)
a unsafe_cast_as Type