@bool
Evaluate a boolean expression or convert a value to a boolean string.
Returns: bool
Syntax
Section titled “Syntax”@bool(...tokens)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
[...tokens] |
any |
Boolean expression (e.g. $a > 0 and $b < 100) |
Examples
Section titled “Examples”# Comparisonsset $a @bool(1 == 1)set $b @bool(5 > 3)set $c @bool(5 <= 3)
# Logical operatorsset $e @bool(true and true)set $f @bool(true or false)set $g @bool(not false)
# Compound expressionset $x 10set $h @bool($x > 0 and $x < 100)