Re: [fpc-pascal]CompareStr

2003-02-15 Thread Jilani Khaldi
>>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. > >Done, but: >CompareStr('hello', 'hello world') still gives 0. > >Strange!!! Sorry. That's Ok now. -- Jilani Khaldi http://www.jilani.net

Re: [fpc-pascal]CompareStr

2003-02-15 Thread Jilani Khaldi
>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. Done, but: CompareStr('hello', 'hello world') still gives 0. Strange!!! -- Jilani Khaldi http://www.jilani.net __

Re: [fpc-pascal]CompareStr

2003-02-15 Thread Michael . VanCanneyt
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 > >

Re: [fpc-pascal]CompareStr

2003-02-15 Thread Jilani Khaldi
>> >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])

Re: [fpc-pascal]CompareStr

2003-02-15 Thread Michael . VanCanneyt
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 > Cou

Re: [fpc-pascal]CompareStr

2003-02-15 Thread Jilani Khaldi
>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 := -o

Re: [fpc-pascal]CompareStr

2003-02-13 Thread Michał Kamburelis
Hello ! You found a bug : CompareStr( 'hello', 'hello-bye' ) = 0. It's already fixed in FPC 1.1 and 1.0.7, so I guess you're using FPC 1.0.6 or older. You can switch to FPC 1.0.7 or you can fix this by editing RTL sources : At least for FPC 1.0.6, it's in file rtl/objpas/sysstr.inc, lines 109 - 1

Re: [fpc-pascal]CompareStr

2003-02-13 Thread Iván Montes
Sorry Michael, I just found out that this happens in the 1.0.6 release version of FPC. It's fixed with a current snapshot. Sorry again, Ivan ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]CompareStr

2003-02-13 Thread Michael Van Canneyt
On Thu, 13 Feb 2003, [iso-8859-1] Iván Montes wrote: > - Original Message - > From: "Michael Van Canneyt" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 13, 2003 1:59 PM > Subject: Re: [fpc-pascal]CompareStr > > > W

Re: [fpc-pascal]CompareStr

2003-02-13 Thread Iván Montes
- Original Message - From: "Michael Van Canneyt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 1:59 PM Subject: Re: [fpc-pascal]CompareStr What version are you using ? I have fixed a bug report about this some time ago: Revision 1

Re: [fpc-pascal]CompareStr

2003-02-13 Thread Michael Van Canneyt
On Thu, 13 Feb 2003, [iso-8859-1] Iván Montes wrote: > Hi, > > Maybe it's how it's supposed to be but if use : > > compareStr( 'hello', 'hello-bye' ) > > I get 0, so they are equal. In the fixbranch version I get -45 ? ( version: Free Pascal Compiler version 1.0.7 [2003/02/03] for i386 ) What

Re: [fpc-pascal]CompareStr

2003-02-12 Thread James Mills
On Thu, Feb 13, 2003 at 02:49:49AM +0100, Iv?n Montes wrote: > Hi, > > Maybe it's how it's supposed to be but if use : > > compareStr( 'hello', 'hello-bye' ) > > I get 0, so they are equal. > > If one string is bigger than the other they should be different, isn't it? > > Otherways what can I

Re: [fpc-pascal]CompareStr

2003-02-12 Thread Sebastian Günther
Iván Montes schrieb: Hi, Maybe it's how it's supposed to be but if use : compareStr( 'hello', 'hello-bye' ) I get 0, so they are equal. If one string is bigger than the other they should be different, isn't it? I think so, too... but I don't have time to check this now, sorry, hopefully som

[fpc-pascal]CompareStr

2003-02-12 Thread Iván Montes
Hi, Maybe it's how it's supposed to be but if use : compareStr( 'hello', 'hello-bye' ) I get 0, so they are equal. If one string is bigger than the other they should be different, isn't it? Otherways what can I use to check if two ansistrings are different? TIA, Ivan