Read or write a bit.
Source position: syshelph.inc line 949
public property TShortIntHelper.Bits[aIndex: TShortIntBitIndex] : Boolean |
Bits property reads or writes boolean value to a bit number determined by argument aIndex.
MyShortInt.Clear;// %00000000 MyShortInt equals 0 MyShortInt.Bits[0] := true; // %00000001 MyShortInt equals 1 MyShortInt.Bits[2] := true; // %00000101 MyShortInt equals 5 WriteLn(MyShortInt.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. |