Arithmetic operators

Operator Description Example
+ Addition [2+2]{result}4
- Subtraction or negation (-4 is negative four)
* Multiplication
/ Division [{gold}/1000]{result}Kgp

Comparison operators

These produce a true/false result. The text following the block is shown only when the result is true, and the block must be closed with |.

Operator Description Example
== Equal to [2==2]|{result}1 (true)
!= Not equal to [2!=2]|{result}0 (false)
< Less than [2<2]|{result}0
> Greater than [2>2]|{result}0
<= Less than or equal to [2<=2]|{result}1
>= Greater than or equal to [2>=2]|{result}1

Logical operators

Operator Description Truth table
&& Logical AND — true only when both operands are true T&&T=T, T&&F=F, F&&F=F
|| Logical OR — true when at least one operand is true T||T=T, T||F=T, F||F=F

Parentheses

Parentheses ( ) control evaluation order. Because the parser has no concept of operator precedence, complex expressions must use parentheses explicitly.

Example — this produces an error:

[{true}&&{false}=={true}]|{result}

The correct form, with parentheses around the && subexpression:

[({true}&&{false})=={true}]|{result}

This correctly prints 0 (false).