Skip to content

TQWordHelper.ToggleBit

Invert bit.

Declaration

Source position: syshelph.inc line 1322

public 
function TQWordHelper.ToggleBit(const Index: TQwordBitIndex) : QWord;

Description

ToggleBit reads bit value from bit number determined by argument Index, inverts it (if it was 0 it becomes 1, and vice versa), and stores it back.

See also

Name Description
TQWordHelper.SetBit Set bit to 1.
TQWordHelper.ToggleBit Invert bit.
TQWordHelper.TestBit Check bit.
TQWordHelper.HighestSetBitPos Return the position of the leftmost bit set.
TQWordHelper.LowestSetBitPos Return the position of the rightmost bit set.
TQWordHelper.SetBitsCount Count number of bits set.
TQWordHelper.Bits Read or write a bit.