Vikari supports the following boolean logic operators:
Operator Name | Symbol | Function |
---|---|---|
And | ^ | Binary operator that applies the AND operation. |
Or | " | Binary operator that applies the OR operation. |
Not | ' | Unary operator that applies the NOT operation. |
Rather than using ' and " for quotation purposes, Vikari uses them as logical operators. Backtick tokens with a pattern of ` and `` etc. are used instead for quotations of character and string literals, respectively.
Logical operator expressions require operands with the Boolean type, and also have a return type of Boolean. This means they can have operands that are a Boolean variable, a literal value of true or false, another logical expression, or a comparison operator expression.
The following demonstrates usage of the logical operators.