EXCLUDE - Reset a bit in a variable

Language reference ›› Built-in procedures ›› Bit management ››
Parent Previous Next

EXCLUDE(<integer-variable>, <bit>)

Reset bit <bit> within <integer-variable>.

This is equivalent to Delphi's exclude statement that applies only to a SET.

PMP may apply this procedure to any integer variable that is assimilated to a SET.


Any integer variable or SFR.


Bit number constant 0..n applicable to <integer-variable>, or NEW! (V2.1): dynamic given by any expression.

 TheWord: WORD;
 BitPos: BYTE;

 EXCLUDE(TheWord, BitPos);