[fpc-pascal] Lazarus with FPC 2.3.1 i386 Mac OSX

Bent Normann Olsen bent at earmaster.com
Tue Feb 5 13:51:59 CET 2008


Jonas,

Thanks for the reply.

I tested this on FPC 2.2.0 for i386 Mac and it worked just as you described.

This is only a workaround for files already stored from a current version of
an application, and future versions will not behave this way ;-)

Thanks again,
Normann

-----Original Message-----
From: fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] On Behalf Of Jonas Maebe
Sent: 5. februar 2008 13:36
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] Lazarus with FPC 2.3.1 i386 Mac OSX


On 05 Feb 2008, at 13:24, Bent Normann Olsen wrote:

> Thanks for the reply,
>
> I was especially interested in the 2.3.1 fix in the sizes for  
> enumerated
> types. Small enumerated types in FPC 2.2.0 has the size of 4 bytes,  
> and 1
> byte in Delphi. Sizes of small enumerated types in FPC 2.3.1 is 1  
> byte after
> the fix.

You can make them 1 byte in FPC 2.2.0 by using {$packenum 1}. It's  
possible that {$packenum 1} has become the default in Delphi mode in  
2.3.1, I don't know.

> I understand, that "set of" types has the size of 4 bytes or 32
> bytes, and probably will be this way for the future releases of FPC.

Delphi-compatible set packing is already available FPC 2.2.1. Storing  
sets in a binary file is a very bad idea though, because they are  
opaque types and you cannot rely in any way on their internal format.  
They're also incompatible between little and big endian systems.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list