BITRESET()

BITRESET()

Top  Previous  Next

 

The BITRESET() function turns off a specified bit in an integer value.

 

 

Format

 

BITRESET(expr, bit)

 

where

 

exprevaluates to the value in which the bit is to be reset.

 

bitevaluates to the bit position (0 to 31).

 

The BITRESET() function converts expr to a 32 bit integer and turns off (sets to 0) the bit identified by bit to form a new integer value as the result. Bits are numbered from 0 to 31 from the least significant end of the value. The effect of this function with a bit value outside this range is undefined.

 

 

Example

 

FLAGS = BITRESET(FLAGS, 2)

 

This statement turns off bit 2 in the FLAGS variable.

 

 

See also:

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