Determines if two strings are not equal.
Syntax
IsNotEqual = SRP_String("NE", String1, String2)
Parameters
Parameter | Description |
---|---|
String1 | One of the two strings to be compared. (REQUIRED) |
String2 | The other string to be compared. (REQUIRED) |
Returns
Returns 0 if the two strings are the same, 1 if not.
Remarks
The NE 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 NE service, on the other hand, always does a character by character comparison.
Example
Str1 = "27" Str2 = "27." // In BASIC+, these are equal If Str1 <> Str2 then Ans = "Not Equal Value" end else Ans = "Equal Value" end // Using the NE service, these strings are not equal If SRP_String("NE", Str1, Str2) then Ans = "Not Equal Strings" end else Ans = "Equal Strings" end // Case insensitive comparison returns 1 (not equal) Ans = SRP_String("NE", "HELLO", "hello")