[fpc-devel]Which bug: FPC or Delphi?

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Thu Sep 13 09:56:46 CEST 2001


Hello,

I found a important difference between FPC (1.1) and Delphi 3.0.
This sample:

{$apptype console}
{$ifdef fpc}
{$mode delphi}
{$endif}
var
 x:integer;
begin
 readln(x);

 writeln(cardinal(x)>100);
end.

after accepting -1 returns "false" if it is compiled with Delphi but "true" if it is compiled with FreePascal.

I think, the behavior of FPC is more correct but then it is not Delphi-compatible here. But maybe it's a Delphi bug?
Is this difference true also for Delphi 4,5,6?

Sincerely, Pavel






More information about the fpc-devel mailing list