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

TShortIntHelper.ToggleBit

Invert bit

Declaration

Source position: syshelph.inc line 476

public function TShortIntHelper.ToggleBit(

  const Index: TShortIntBitIndex

):ShortInt;

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

TShortIntHelper.SetBit

  

Set bit to 1

TShortIntHelper.ClearBit

  

Set bit to 0

TShortIntHelper.TestBit

  

Check bit

TShortIntHelper.HighestSetBitPos

  

Return the position of the leftmost bit set

TShortIntHelper.LowestSetBitPos

  

Return the position of the rightmost bit set

TShortIntHelper.SetBitsCount

  

Count number of bits set

TShortIntHelper.Bits

  

Read or write a bit


Documentation generated on: Sep 29 2022