RAD Studio VCL Reference
SysUtils.LongRec Record

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

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

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 dissected. 

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


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!