[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
or                       Logical and Bitwise Operator OR

 <bool exp> or <bool exp>   { does a logical OR; result is Boolean }
 <int exp>  or <int exp>    { does a bitwise OR; result is Integer }     [TP]

    The operator OR can be used for both boolean and integer expressions.
    For boolean expressions, it uses the left truth table below:

  +-----------------------------------------------------------------------+
  | <exp1>  <exp2> | <exp1> or <exp2>    <bit1> <bit2> | <bit1> or <bit2> |
  |----------------+-----------------------------------+------------------|
  | FALSE   FALSE  |       FALSE           0      0    |         0        |
  | FALSE   TRUE   |       TRUE            0      1    |         1        |
  | TRUE    FALSE  |       TRUE            1      0    |         1        |
  | TRUE    TRUE   |       TRUE            1      1    |         1        |
  +-----------------------------------------------------------------------+

    For integer expressions, it does a bit-by-bit combination of the two
    integer values, using the right truth table above. The result is a
    sixteen-bit integer value.

         <bool exp>   any combination of Boolean values and operators.

         <int expr>   any combination of Integer values and operators.

  -------------------------------- Example ---------------------------------

           repeat
             ...
           until (Indx > Size) or Found;

           I := $4123 or $0F00;     { I = $4F23 }

See Also: and xor not
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson