The =
operator sets the value of a constant.
VALUE = 10
The :=
operator sets the value of a variable.
x := 5
You can use basic arithmetic operations.
x := y + z ' add x := y - z ' subtract x := y * z ' multiply x := y / z ' divide
Modulo (//
) finds the remainder after division.
x := y // z
You can group expressions using parentheses.
x := (y + 4) - (z + 3) x := ((y + 4) + 4)
Decrement (--
) subtracts one from a value, while increment (++
) adds one.
x++ x--
A relational operator tests the relationship between two values. Expressions that use them return a non-zero number if true, or zero if false.
You can test if two values are equal with ==
, or not equal with <>
.
x == y x <> y
You can also test inequality.
x < y ' x is less than y x > y ' x is greater than y x =< y ' x is equal to or less than y x => y ' x is equal to or greater than y
Logical operators, or boolean operators allow you to create more specific tests in your application.
AND
-
When both expressions are true, return true.
x and y
OR
-
When either of the expressions are true, return true.
x or y
NOT
-
Negate the result of an expression. I.e. if the expression is true, return false; if false, return true.
x and not y