[fpc-devel]Different behavior between Kylix and FPC

Pedro Lopez-Cabanillas plcl at telefonica.net
Mon Nov 10 22:58:07 CET 2003


Hi,

The following program behaves different in Kylix3 and FPC 1.9.

program test5;
{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

var
  i: Integer;
begin
  for i:=1 to 1 do WriteLn(i);
  WriteLn(i, ' <===');
end.


$ fpc test5
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 1.9.0 [2003/11/05] for i386
Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling test5.pp
Linking test5
11 Lines compiled, 0.2 sec

$ ./test5
1
1 <===

$ dcc test5.pp
Borland Delphi for Linux Version 14.5   Open Edition
Copyright (c) 1983,2002 Borland Software Corporation
test5.pp(10) Warning: FOR-Loop variable 'i' may be undefined after loop
test5.pp(12)
13 lines, 0.07 seconds, 22540 bytes code, 3088 bytes data.

$ ./test5
1
2 <===

Regards,
Pedro

-- 
ALSA Library Bindings for Pascal
http://alsapas.alturl.com





More information about the fpc-devel mailing list