[fpc-devel]bug report 2181

Rimgaudas Laucius rimga at ktl.mii.lt
Wed Oct 16 11:10:31 CEST 2002


> >
> > About bug report 2181: why 9985 in [1, 2]?
> > M := 9985;
> >  if M in [1, 2] then WriteLn ('Error!');
> >
> > I tryed it with fpc 1.1. There is consistent pattern:
> > for m:= 1 to n do
> >  if (m*256+x) in [x] then
> >    writeln(m);
>
> This is also how TP/Delphi handles it. We also got a bug report in the
> past that asked for this behaviour.
> Compile with -Cr to get an error.

I know sets can be only 4 byte width. But i trayed it with Delphi 6 previuos
to Fpc and this misguide me. Because Delphi program works without runtime
error (compiled with range checking on) and does not print anything to
screen.





More information about the fpc-devel mailing list