System.SysUtils.Int64Rec

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

  Int64Rec = packed record
    case Integer of
      0: (Lo, Hi: Cardinal);
      1: (Cardinals: array [0..1] of Cardinal);
      2: (Words: array [0..3] of Word);
      3: (Bytes: array [0..7] of Byte);
  end;

C++

struct DECLSPEC_DRECORD Int64Rec
{
public:
    union
    {
        struct
        {
            System::StaticArray<System::Byte, 8> Bytes;
        };
        struct
        {
            System::StaticArray<System::Word, 4> Words;
        };
        struct
        {
            System::StaticArray<unsigned, 2> Cardinals;
        };
        struct
        {
            unsigned Lo;
            unsigned Hi;
        };
    };
};

Properties

Type Visibility Source Unit Parent
record
struct
public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Int64Rec declares a utility record to provide access to the bytes of an Int64 value.

The Int64Rec type declares a utility record that stores 8 contiguous (packed) bytes of data. Int64Rec is used primarily for typecasting, where Int64 data needs to be analyzed.

The 8 bytes may be accessed individually through the Bytes array, or as an array of 4 Words, or as one of 2 Cardinals. Also, the value may be accessed through the Hi and Lo order Cardinals.