Can I assume that you hadn't noticed that compr_len = *((int32_t*)&data[24]); was a 32 bit integer?
Is there such a thing as pint32? (Google suggests that a pint is 32 half-ounces) compr_len:=pint64(@data[24])^; ? On 7 July 2012 19:27, Hans-Peter Diettrich <[email protected]> wrote: > 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 > > > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
