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

TCardinalHelper.ToggleBit

Invert bit

Declaration

Source position: syshelph.inc line 653

public function TCardinalHelper.ToggleBit(

  const Index: TCardinalBitIndex

):Cardinal;

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

TCardinalHelper.SetBit

  

Set bit to 1

TCardinalHelper.ToggleBit

  

Invert bit

TCardinalHelper.TestBit

  

Check bit

TCardinalHelper.HighestSetBitPos

  

Return the position of the leftmost bit set

TCardinalHelper.LowestSetBitPos

  

Return the position of the rightmost bit set

TCardinalHelper.SetBitsCount

  

Count number of bits set

TCardinalHelper.Bits

  

Read or write a bit


Documentation generated on: Sep 29 2022