[Lazarus] LongString does not work?

Luca Olivetti luca at wetron.es
Mon Mar 4 17:10:52 CET 2013


Al 03/03/13 21:52, En/na Sven Barth ha escrit:
> 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.

At the moment I don't care about the platform, only about different
(newer) versions of the compiler.
Currently , with 2.6.0, bitpacked under win32 gives me the correct
layout (I have to adjust endianness for words/dwords but individual bit
fields are where they should be).
Can I be sure that 2.6.2 (and later version) won't break my code?

Bye
-- 
Luca Olivetti
Wetron Automation Technology http://www.wetron.es
Tel. +34 935883004  Fax +34 935883007





More information about the Lazarus mailing list