[Lazarus] C Integer types

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Jul 7 19:27:26 CEST 2012


Marco van de Voort schrieb:

> This assumes data is a pbyte or pchar (char * or byte *)
> 
> then & translates to @, and int64_t* to pint64 the first * changes to ^ at
> the end:
> 
>    seqence_crc:=pint64(data)^;
or
      seqence_crc:=pint64(@data[0])^;
>    seqence_key:=pint64(@data[8])^;
>    compr_crc:=pint64(@data[16])^;
>    compr_len:=pint64(@data[24])^;
> 
>> I'm pretty sure there is a way of doing this natively, but I can't
>> seem to find it.
> 
> It's 1:1 translatable. Note the absence of @ and & in the first line though,
> that is on purpose. (in both fragments)

For the curious and nonbelievers:
Array syntax can be used in the first line, too, see above.

DoDi





More information about the Lazarus mailing list