[fpc-devel]1.9.4 String comparison problem
Johann Glaser
Johann.Glaser at gmx.at
Thu Aug 26 16:33:23 CEST 2004
Hi!
In FPC 1.9.4 there is a bug concerning comparison of a string if it is
empty. The program to test is
Program Bug;
Var SS : ShortString;
AS : AnsiString;
Begin
SS := 'asdf';
AS := 'asdf';
WriteLn('SS > '''': ', SS > '');
WriteLn('Length(SS) > 0: ' , Length(SS) > 0);
WriteLn('AS > '''': ', AS > '');
WriteLn('Length(AS) > 0: ' , Length(AS) > 0);
End.
This should emit 4 times "TRUE" but gives a "FALSE" for the first line.
I compiled it with FPC 1.9.4
Free Pascal Compiler version 1.9.4 [2004/08/12] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
from the Debian package fp-compiler_1.9.4-5_i386.deb.
There is a bug ID 2388 which was marked "Fixed" on 2003-10-24. Since
1.9.4 is newer, I'm concerned this was forgotten. Shall I re-submit this
bug?
Bye
Hansi
--
Johann Glaser <Johann.Glaser at gmx.at>
Vienna University of Technology
Electrical Engineering
____ http://www.johann-glaser.at/ ____
More information about the fpc-devel
mailing list