Read or write a bit
Source position: syshelph.inc line 1004
public property TNativeIntHelper.Bits[aIndex: TNativeIntBitIndex] : Boolean |
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
|
Set bit to 1 |
|
|
Set bit to 0 |
|
|
Invert bit |
|
|
Check bit |
|
|
Return the position of the leftmost bit set |
|
|
Return the position of the rightmost bit set |
|
|
Count number of bits set |
|
|
Read or write a nibble |
|
|
Read or write a byte |
|
TNativeIntHelper.Words |
|
Read or write a word |
TNativeIntHelper.DWords |