[Gambas-user] string operator == and others
Benoît Minisini
gambas at ...1...
Wed Nov 10 14:36:58 CET 2010
> i also check these, i use gambas2-2.21 rev3289 updated today (10/11/2010
> dd/mm/yyyy).
>
> PRINT "abc" < "abc" 'false
> PRINT "abc" < "aBc" 'false
> PRINT "ABC" < "abc" 'true
>
> are these correct?
> in http://gambasdoc.org/help/cat/stringop says
> Returns if String1 is strictly lower than String2.
>
> PRINT "ABC" < "abc" 'true
>
> is this correct? Lower means lowercase not capital, is it?
> If so "ABC" is greater than "abc".
>
> Also
> PRINT "abc" > "abc" 'false
> PRINT "abc" > "aBc" 'true
> PRINT "ABC" > "abc" 'false
>
> PRINT "abc" <= "abc" 'true
> PRINT "abc" <= "aBc" 'false
> PRINT "ABC" <= "abc" 'true
>
> PRINT "abc" >= "abc" 'true
> PRINT "abc" >= "aBc" 'true
> PRINT "ABC" >= "abc" 'false
Strings are compared using binary comparison, i.e. the ASCII value of their
characters. In ASCII, 'A' < 'a'.
Regards,
--
Benoît Minisini
More information about the User
mailing list