BITOR()

BITOR()

Top  Previous  Next

 

The BITOR() function forms the bitwise logical OR of two integer values.

 

 

Format

 

BITOR(expr1, expr2)

 

where

 

expr1 and expr2 evaluate to integers

 

 

The BITOR() function converts expr1 and expr2 to 32 bit integers and performs a bit-by-bit logical OR to form a new integer value as the result.

 

The value of each bit in the result is 1 if same bit position in one or both of expr1 and expr2 is 1.

 

 

Example

 

FLAGS = BITOR(FLAGS, 8)

 

This statement sets the bit with integer value 8 in the FLAGS variable.

 

 

See also:

BITAND(), BITNOT(), BITRESET(), BITSET(), BITTEST(), BITXOR(), SHIFT()