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

TIntegerHelper.ToggleBit

Invert bit.

Declaration

Source position: syshelph.inc line 1189

public function TIntegerHelper.ToggleBit(

  const Index: TIntegerBitIndex

):Integer;

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

TIntegerHelper.SetBit

  

Set bit to 1.

TIntegerHelper.ToggleBit

  

Invert bit.

TIntegerHelper.TestBit

  

Check bit.

TIntegerHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TIntegerHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TIntegerHelper.SetBitsCount

  

Count number of bits set.

TIntegerHelper.Bits

  

Read or write a bit.


Documentation generated on: Dec 21 2024