Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns 1 if the String1 is less than String2 or 0 if String1 is greater than or equal to String2.

Remarks

Added in 2.2.6

The LTC service compares two variables as strings. When you use the BASIC+ equality operator, the variables' contents will be compared according to abstract value, which means "123" will be equal to "123.000" instead of less than. The LTC service, on the other hand, always does a character by character comparison.

...

Code Block
Str1 = "27"
Str2 = "27."

// BASIC+ returns 0
IsLessThan = (Str1 _LTC Str2)

// The LTC service returns 1
IsLessThan = SRP_String("LTC", Str1, Str2)

// Case insensitive comparison returns 0 (str1 is equal to str2, not less than)
IsLessThan = SRP_String("LTC", "hello", "HELLO")

...