Bernd schrieb:
2012/7/7 Marco van de Voort <[email protected]>:

   seqence_crc:=pint64(data)^;
   seqence_key:=pint64(@data[8])^;
   compr_crc:=pint64(@data[16])^;
   compr_len:=pint64(@data[24])^;

How about defining something more pascalish first, a record type for example:

{$modeswitch autoderef}

type
  PDataHeader = ^TDataHeader;
  TDataHeader = record
    sequence_crc: QWord;
    sequence_key: QWord;
    compr_crc: QWord;
    compr_len: DWord;
  end;

IMO all these members should be pointers, of size 64 bit according to the index increment (8 bytes?). Typecasts will be needed for 32 bit pointers, as demonstrated in above code.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to