Declaration¶
Source position: syshelph.inc line 1343
type
TInt64Helper = type helper for Int64
const
MaxValue = High(int64);
MinValue = Low(int64);
MaxBit = High(TInt64BitIndex);
MinBit = Low(TInt64BitIndex);
MaxNibble = High(TInt64NibbleIndex);
MinNibble = Low(TInt64NibbleIndex);
MaxByte = High(TInt64ByteIndex);
MinByte = Low(TInt64ByteIndex);
MaxWord = High(TInt64WordIndex);
MinWord = Low(TInt64WordIndex);
MaxDword = High(TInt64DwordIndex);
MinDword = Low(TInt64DwordIndex);
public
class function Parse : Int64;
class function Size : Integer;
class function ToString(const AValue: Int64) : string; overload;
function ToString : string; overload;
class function TryParse : Boolean;
function ToBoolean : Boolean;
function ToDouble : Double;
function ToExtended : Extended;
function ToBinString : string;
function ToHexString(const AMinDigits: Integer) : string; overload;
function ToHexString : string; overload;
function ToSingle : Single;
function SetBit : Int64;
function ClearBit : Int64;
function ToggleBit : Int64;
function TestBit : Boolean;
procedure Clear;
function HighestSetBitPos : Int8;
function LowestSetBitPos : Int8;
function SetBitsCount : Byte;
property Bits[aIndex : TInt64BitIndex = 0..63]: Boolean; {rw}
property Nibbles[aIndex : TInt64NibbleIndex = TQwordNibbleIndex]: nibble; {rw}
property Bytes[aIndex : TInt64ByteIndex = TQwordByteIndex]: Byte; {rw}
property Words[aIndex : TInt64WordIndex = TQwordWordIndex]: Word; {rw}
property DWords[aIndex : TInt64DwordIndex = TQwordDwordIndex]: DWord; {rw}
end;
Inheritance¶
Description¶
TInt64Helper contains some auxiliary routines for a Int64-typed ordinal value. It consists mainly of conversion routines to and from other types.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Bits | public | Read or write a bit. |
| Bytes | public | Read or write a byte. |
| DWords | public | Read or write a dword. |
| Nibbles | public | Read or write a nibble. |
| Words | public | Read or write a word. |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Clear | public | Set value to 0. |
| ClearBit | public | Set bit to 0. |
| HighestSetBitPos | public | Return the position of the leftmost bit set. |
| LowestSetBitPos | public | Return the position of the rightmost bit set. |
| Parse | public | Convert from a string. |
| SetBit | public | Set bit to 1. |
| SetBitsCount | public | Count number of bits set. |
| Size | public | Size, in bytes, of the Int64 value. |
| TestBit | public | Check bit. |
| ToBinString | public | Convert to a binary string representation. |
| ToBoolean | public | Convert to a boolean value. |
| ToDouble | public | Convert to a double-sized floating point value. |
| ToExtended | public | Convert to an extended-sized floating point value. |
| ToggleBit | public | Invert bit. |
| ToHexString | public | Convert to a hexadecimal string representation. |
| ToSingle | public | Convert to an single-sized floating point value. |
| ToString | public | Convert the value to string. |
| TryParse | public | Try to convert a string to a Int64, report success or failure. |
See also¶
| Name | Description |
|---|---|
| TStringHelper | Helper type for strings. |
| TShortIntHelper | Helper for a ShortInt-typed ordinal value. |
| TSmallIntHelper | Helper for a SmallInt-typed ordinal value. |
| TWordHelper | Helper for a Word-typed ordinal value. |
| TCardinalHelper | Helper for a Cardinal-typed ordinal value. |
| TIntegerHelper | Helper for a Integer-typed ordinal value. |
| TByteHelper | Helper for a byte-typed ordinal value. |
| TQWordHelper | Helper for a QWord-typed ordinal value. |
| TNativeIntHelper | Helper for a NativeInt-typed ordinal value. |
| TNativeUIntHelper | Helper for a NativeUInt-typed ordinal value. |