TNativeIntHelper.Bits¶
Read or write a bit.
Declaration¶
Source position: syshelph.inc line 1474
public property Bits[aIndex : TNativeIntBitIndex = TInt64BitIndex]: Boolean;
Description¶
Bits property reads or writes boolean value to a bit number determined by argument aIndex.
MyNativeInt.Clear;// MyNativeInt equals 0
MyNativeInt.Bits[0] := true; // MyNativeInt equals 1
MyNativeInt.Bits[2] := true; // MyNativeInt equals 5
WriteLn(MyNativeInt.Bits[2]); // TRUE
See also¶
| Name | Description |
|---|---|
| TNativeIntHelper.SetBit | Set bit to 1. |
| TNativeIntHelper.ClearBit | Set bit to 0. |
| TNativeIntHelper.ToggleBit | Invert bit. |
| TNativeIntHelper.TestBit | Check bit. |
| TNativeIntHelper.HighestSetBitPos | Return the position of the leftmost bit set. |
| TNativeIntHelper.LowestSetBitPos | Return the position of the rightmost bit set. |
| TNativeIntHelper.SetBitsCount | Count number of bits set. |
| TNativeIntHelper.Nibbles | Read or write a nibble. |
| TNativeIntHelper.Bytes | Read or write a byte. |
| TNativeIntHelper.Words | Read or write a word. |
| TNativeIntHelper.DWords |