| **Navigation:**  [[introduction.htm|Language Reference]] > 10 - Expressions > Operators >====== Logical Operators ====== | [[the concatenation operator.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[constants.htm|{{btn_next_n.gif|Next page}}]] | | || A logical operator compares two operands or expressions and produces a true or false condition. There are two types of logical operators: conditional and Boolean. Conditional operators compare two values or expressions. Boolean operators connect string, numeric, or logical expressions together to determine true-false logic. Operators may be combined to create complex operators. | **Conditional Operators** | **=** | Equal sign | | \\ | **<;** | Less than | | | **>** | Greater than | | **Boolean Operators** | **NOT** | Boolean (logical) NOT | | | **~** | Tilde (logical NOT) | | | **AND** | Boolean AND | | | **OR** | Boolean OR | | | **XOR** | Boolean eXclusive OR | | **Combined operators** | **<;>** | Not equal | | | **~=** | Not equal | | | **NOT =** | Not equal | | | **<;=** | Less than or equal to | | | **=<;** | Less than or equal to | | | **~>** | Not greater than | | | **NOT >** | Not greater than | | | **>=** | Greater than or equal to | | | **=>** | Greater than or equal to | | | **~<;** | Not less than | | | **NOT <;** | Not less than | During logical evaluation, any non-zero numeric value or non-blank string value indicates a true condition, and a null (blank) string or zero numeric value indicates a false condition. **Example:** __**Logical Expression**__**             **__**Result**__ ** A = B                          True when A is equal to B** ** A <; B                          True when A is less than B** ** A > B                          True when A is greater than B** ** A <;> B, A ~= B, A NOT = B      True when A is not equal to B** ** A ~<; B, A >= B, A NOT <; B      True when A is not less than B** ** A ~> B, A <;= B, A NOT > B      True when A is not greater than B** ** ~ A, NOT A                     True when A is null or zero** ** A AND B                        True when A is true and B is true** ** A OR B                         True when A is true, or B is true, or both are true** ** A XOR B                        True when A is true or B is true, but not both.**