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