Compound operators. A shorthand for augmented assignment, used by replacing the colon with a mathematical operator. Possible operators are: +=
, -=
, *=
, /=
, and |=
.
Increment and decrement. Increase a value by 1 with a ++
at the beginning or end; decrease it by 1 with --
. Can be used standalone (only with variables, to change the actual value) or in an expression.
String interpolation. Use non-conditional on-page coding in strings.
Headless dice notation. The prefix is not necessary when rolling a single die.
Alternate base notation. Input numbers in a binary format with the prefix 0B
or simply B
. Similarly, input octal numbers with Q
and hexadecimal with X
.
Modulo. The |
operator performs a modulo operation (returns the remainder of a division).
Exponentation. The ^
operator performs exponentation (the exponent must be a nonvariable integer).
Block aliases. Parentheses can be used in place of the BEGIN
and END
keywords. Comma-separated assignment statements are also automatically blocked.
Variable initialization/reset. A statement consisting solely of a variable assigns it its base value: either a zero or empty string.
Variable swap. Swap variable values (using a temp variable) with the =:=
(or <>
) operator.
Conditional aliases. The operators IS
and ISNT
alias to =
and !=
. The keyword UNLESS
aliases to an inverted IF
.
Abstract Equality. If enabled, the operators =
and !=
become non-strict, meaning strings and integers can be compared (1 = "1"
). In this case, IS
and ISNT
retain their strictness.
Arrays, lists, and loops. Define a group of variables with a list variable (prefixed with the &
sigil) and list literal (%VAR1, %VAR2, ...)
. Alternatively, use square brackets after a variable name containing a length (%VAR[3]
, starting at 1
) or range %VAR[0,2]
for a more pseudo-array type list literal composed of suffixed variables. These arrays and lists, or even numbers, can be used as arguments for “loops”.
Loops (FOR...DO
and FOR...IN...DO
) allow you to perform variants of the same action on a selection of variables or a predefined number of times. In each iteration, the current variable (if applicable) automatically replaces instances of the @
-prefixed placeholder provided before the IN
keyword, defaulting to @SELF
if none is provided. Similarly, the current iteration count automatically replaces the placeholder provided before the IN
keyword, defaulting to @INDEX
. Loops over lists use both placeholders, and to specify each, write the @SELF
placeholder first and separate the two with a comma.
Subroutines. Uses the ?
sigil. Define a piece of code and then later reuse it at any point. Can optionally define arguments—expression values or lists—to be replaced when called, in the style of @1
, @2
, @3
,
etc.
Random statement. A new ONE OF
statement that chooses a random statement from a provided block.