TByteHelper.ToggleBit¶
Invert bit.
Declaration¶
Source position: syshelph.inc line 901
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¶
| Name | Description |
|---|---|
| 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. |