/sys$common/syshlp/TPUHELP.HLB  —  BOOLEAN_EXPRESSIONS
  BOOLEAN EXPRESSIONS

  In DECTPU, all odd integers can be used to represent the Boolean value
  TRUE, and all even integers can be used to represent the Boolean value
  FALSE.

  DECTPU evaluates Boolean expressions by performing logical operations on
  the operands one bit at a time.  For example, if DECTPU encounters the
  expression 7 AND 9, it performs four AND operations, evaluating each bit
  of 7 with the corresponding bit of 9, as follows:

      0     1     1    1
     AND   AND   AND   AND
      1     0     0    1
     ---------------------
      0     0     0     1

  In this example, the four bits produced by the four AND operations
  evaluate to 1.  Since odd values are TRUE, the result of 7 and 9 could be
  used to represent the Boolean value TRUE.

  When executing a Boolean expression, DECTPU evaluates expressions enclosed
  in parentheses before other elements.  When using multiple operators
  (logical or otherwise) in one expression, you should use parentheses to
  ensure that the compiler evaluates expressions in the order you intend.
  For example, the following IF clause shows how to parenthesize an
  expression containing both logical and relational operators:

     IF (x = 12) AND (y <> 40)
Close Help