Versions Compared

Key

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

...

Returns 1 if the two strings are the same, 0 if not.

Remarks

Added in 2.2.6

The EQC 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". The EQC service, on the other hand, always does a character by character comparison.

...

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

// In BASIC+, thesereturns are equal
If Str1 = Str2 then
    Ans = "Equal Value"
end else
    Ans = "Not Equal Value"
end

// Using the Compare service, these strings are not equal
If1
IsEqual = (Str1 _EQC Str2)

// EQC service returns 0
IsEqual = SRP_String("EQC", Str1, Str2) then
    Ans = "Equal Strings"
end else
    Ans = "Not Equal Strings"
end

// Case insensitive comparison returns 1
AnsIsEqual = SRP_String("EQC", "HELLO", "worldhello")

See Also