[fpc-pascal]CompareStr

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Sat Feb 15 23:45:44 CET 2003


On Sat, 15 Feb 2003, Jilani Khaldi wrote:

> >> >At least for FPC 1.0.6, it's in file rtl/objpas/sysstr.inc, lines 109 - 110
> >> >:
> >> >You should replace these two lines
> >> >   if Count1 > Count2 then result := ord(s1[Count1 + 1])
> >> >   else result := -ord(s2[Count2 + 1]);
> >> >with
> >> >   if Count1 > Count2 then result := ord(s1[Count + 1])
> >> >   else result := -ord(s2[Count + 1]);
> >> >(that is, the "Count1" and "Count2" in array indexes should be replaced
> >> >with  "Count").
> >> >
> >> >That's all for THAT bug.
> >> I have done this and run make (/usr/local/..rtl/ under Linux) but:
> >>
> >> CompareStr('hello', 'hello wrld') still gives 0.
> >>
> >> What am I missing here?
> >
> >The official 1.0.6 had this bug. It's fixed now in the latest snapshots,
> >as confirmed by the original poster.
> Well. But, what I want to do is just to correct this bug and stick with 1.0.6. Why do I have to update the hole compiler for just one bug when
> I could fix it with little editing?

You can simply download the latest RTL  sources. from
ftp://ftp.freepascal.org/pub/fpc/source
and compile it. You don't need the whole compiler for it.

Michael.




More information about the fpc-pascal mailing list