Logical operators

x and y   # TRUE if both x and y are TRUE
x or y    # TRUE if x or y are TRUE
not x     # TRUE if x is FALSE

The operands (x and y above) are in most cases integers where:

  • a 0 is considered FALSE

  • a value unequal to 0 is considered TRUE

The result of logical operators is a 0 (FALSE) or 1 (TRUE), of type integer.