[fpc-pascal]CompareStr

Sebastian Günther sguenther at gmx.de
Thu Feb 13 03:01:15 CET 2003


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 somebody else has.


> Otherways what can I use to check if two ansistrings are different?

You can just use "=" for ShortString, AnsiString and WideString 
comparisons. "=" just doesn't work for PChar or PWideChar strings.


- Sebastian




More information about the fpc-pascal mailing list