Lingo Dictionary > A-C > bitOr() |  |

bitOr()

Syntax

    bitOr(integer1, integer2)

Description

Function; converts the two specified integers to 32-bit binary numbers and returns a binary number whose digits are 1's in the positions where either number had a 1, and 0's in every other position. The result is the new binary number, which Lingo displays as a base 10 integer.

Integer | Binary number (abbreviated)
--- | ---
5 | 0101
6 | 0110
Result |
7 | 0111

Example

This statement compares the 32-bit binary versions of 5 and 6 and returns the result as an integer:

    put bitOr(5, 6)
    -- 7

See also

`bitNot(), bitAnd(), bitXor()`