Logical Operators

Airscript supports logical operators that return different values based on the values of and relationship between the two operands.

Unlike Airscript functions, Airscript operators not placed before the variables they are operating on, but rather between them, analogous to how operators are written in simple arithmetic equations. For instance, the following example uses the logical operator AND to check if both TRUE and FALSE are TRUE (they are not):

TRUE AND FALSE -> FALSE

Multiple logical operators can be chained together to connect arbitrarily many Airscript expressions. By default, these operators will be evaluated from left to right, so that the expression:

TRUE AND FALSE OR TRUE XOR FALSE

is equivalent to the expression:

((TRUE AND FALSE) OR TRUE) XOR FALSE

Expressions in parenthesis are always evaluated first. To evaluate logical operators in a different order than the default, use parenthesis to define evaluation order.

Last updated