bitOr

bitOr(op: Integer64): Integer64;

The bitOr method of the Integer64 primitive type compares each bit in the receiver with the corresponding bit in the op parameter, and returns an integer representing the receiver bits ORed with the argument.

The generated return values are listed in the following table.

Bits in Receiver and Operand Corresponding Bit in Return Value
One or both bits are 1 1
Neither bit is 1 0

The code fragment in the following example shows the use of the bitOr method.

constants
    BitFlagNone = #00;
    BitFlag1    = #01;
vars
    int : Integer64;
begin
    int := BitFlagNone;
    // set bit flag 1
    int := int.bitOr(BitFlag1);
    // test that bit flag 1 is set
    if int.bitAnd(BitFlag1) <> 0 then
        write "flag 1 is set";
    endif;
end;