[Lazarus] LongString does not work?

Sven Barth pascaldragon at googlemail.com
Sun Mar 3 21:52:59 CET 2013


On 03.03.2013 20:32, Luca Olivetti wrote:
> Al 03/03/13 14:34, En/na Sven Barth ha escrit:
>
>> For "packed" there is the
>> guarantee though that the layout will stay the same.
>
> Are you sure? Does the same guarantee apply to bitpacked?
> Lately I've become lazy, and instead of manually decoding data (bits,
> bytes, words) read from a device, I'm relying on packed/bitpacked
> records, but I wasn't sure that upgrading the compiler wouldn't break my
> code.

For "packed" it is guaranteed (*), because this is the whole purpose of 
this modifier, for "bitpacked" it is not. It just tells the compiler to 
pack the record as densly as possible, but depending on the platform 
this might not be possible.

(*) the only exception for this is the JVM platform, because there the 
file I/O mechanism of Pascal is not supported

Regards,
Sven




More information about the Lazarus mailing list