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

TByteHelper.ToggleBit

Invert bit.

Declaration

Source position: syshelph.inc line 893

public function TByteHelper.ToggleBit(

  const Index: TByteBitIndex

):Byte;

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

TByteHelper.SetBit

  

Set bit to 1.

TByteHelper.ClearBit

  

Set bit to 0.

TByteHelper.TestBit

  

Check bit.

TByteHelper.HighestSetBitPos

  

Return the position of the leftmost bit set.

TByteHelper.LowestSetBitPos

  

Return the position of the rightmost bit set.

TByteHelper.SetBitsCount

  

Count number of bits set.

TByteHelper.Bits

  

Read or write a bit.


Documentation generated on: Jul 24 2023