Page History
Determines if two strings are not equal, ignoring case insensitively.
Syntax
Code Block |
---|
IsNotEqual = SRP_String("NEC", String1, String2) |
...
Returns 0 if the two strings are the same, 1 if not.
Remarks
Added in 2.2.6
The NEC 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 comparing "123" to "123.0" will return 0 (equal) when you might expect it to return 1 (not equal). The NEC service, on the other hand, always does a character by character comparison.
...
Code Block |
---|
Str1 = "27" Str2 = "27." // In BASIC+, thesereturns are0 (equal) IfIsNotEqual = (Str1 <>_NEC Str2 then Ans = "Not Equal Value" end else Ans = "Equal Value" end // Using the) // NEC service, thesereturns strings1 are (not equal) IfIsNotEqual = SRP_String("NEC", Str1, Str2) then Ans = "Not Equal Strings" end else Ans = "Equal Strings" end // Case insensitive comparison returns 0 (equal) AnsIsNotEqual = SRP_String("NEC", "HELLO", "hello") |
...