RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.LongRec Record

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

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

SysUtils

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) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!