[fpc-devel]Some set problems

Florian Klaempfl florian at klaempfl.de
Fri Nov 16 11:57:47 CET 2001


At 12:04 16.11.01 +0300, you wrote:
>Hello,
>
>May be, these found problems are obsolete and are lready fixed but I could 
>report them.
>
>FPC 1.1 (my compiler is based on 1-Nov sources):
>1) does not support set of boolean, unlike Delphi and VP;
>2) sizeof applied to set types demonstrates that sets in FPC are not the 
>same as sets in Delphi and VP:
>
>{$apptype console}
>type
>  t1=set of 0..1;
>  t2=set of 0..15;
>  t3=set of 0..31;
>  t4=set of 0..63;
>  t5=set of 0..127;
>  t6=set of 0..255;
>begin
>  writeln(sizeof(t1),' ',
>          sizeof(t2),' ',
>          sizeof(t3),' ',
>          sizeof(t4),' ',
>          sizeof(t5),' ',
>          sizeof(t6));
>end.
>
>Output:
>
>Delphi 3, Delphi 6, VP2.1:
>1 2 4 8 16 32
>
>FPC 1.1:
>4 4 4 32 32 32

We know about this, but it isn't fixed yet and it requires a lot of work to 
fix it :/
It simply has historical reasons. When I implemented the first set support 
in FPC
(probably 7 years ago) I was far away from thinking about making FPC TP or 
Delphi compatible.
So I decided to support only two set sizes: 4 and 32 bytes to make things 
easier.





More information about the fpc-devel mailing list