Show: Object Pascal C++
Display Preferences

System.SysUtils.LongRec

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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

C++

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

Properties

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

Description

LongRec declares a utility record to provide access to the bytes of a LongWord value.

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

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

Personal tools
Translations