Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TWordHelper.ToggleBit

Invert bit.

Declaration

Source position: syshelph.inc line 999

public function TWordHelper.ToggleBit(

  const Index: TWordBitIndex

):Word;

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

TWordHelper.SetBit

  

Set bit to 1.

TWordHelper.ToggleBit

  

Invert bit.

TWordHelper.TestBit

  

Check bit.

TWordHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TWordHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TWordHelper.SetBitsCount

  

Count number of bits set.

TWordHelper.Bits

  

Read or write a bit.


Documentation generated on: Nov 26 2024