Quote:
Originally Posted by chaley
The operators compare strings. If you want to compare numbers you will still need to use the cmp() function. You will also need to use strcmp() if you want < or >.
|
While improving performance I found I could add all the relational operators without a performance penalty. I also could add numeric relational ops, using slightly different operators. What will be there:
- String (case insensitive): ==, !=, <, <=, >, >=
String comparisons of numbers will use lexical ordering. For example, 11 < 2 is True.
- Numeric: ==#, !=#, <#, <=#, >#, >=#
Numeric comparison returns False if either left or right is non-numeric. Specifically, the empty string is not a number. For example, '' <# 1 is False