Skip to content

AND Expression

AND performs a logical AND on two integer-parsed operands.

Syntax

AND{left;right}

The production implementation parses both operands with std::stoi, casts them to bool, and returns 1 or 0. Integer 0 is false; a non-zero integer is true.

Evaluation behavior

AND is a normal leaf expression, not lazy control flow. Nested expressions in both operands are resolved before AND itself is evaluated. Do not rely on AND for short-circuiting a side-effecting expression such as CMD{...}; use lazy IF or SWITCH routing when execution must depend on a branch.

Examples

These forms are already exercised by ACE's expression tests:

AND{1;1}   -> 1
AND{1;0}   -> 0
AND{0;0}   -> 0

Nested expressions may supply either operand. Use expressions that resolve to integer values, normally 0 or 1, for boolean logic.