STRDIF real-valued function STRDIF real-valued function Syntax STRDIF ($a, $b) Function Compare two strings byte by byte for the purpose of sorting. This function always compares bytes exactly. It ignores the setting of the UPPER system switch. Parameters $a A string constant, variable, or expression that contains the bytes to be compared with those in $b . $b A string constant, variable, or expression that contains the bytes to be compared with those in $a . Details This function compares strings byte by byte, using the unsigned byte values without any case conversion. That is, the function ignores the setting of the UPPER system switch. The two strings can have different lengths.
The returned values and their meanings are as follows: Note that the value is FALSE (0) if the strings are the same. Example Sort two names in alphabetical order: $name[0] = "Michael" $name[1] = "MARK" CASE STRDIF($name[0],$name[1]) OF VALUE -1, 0: eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 511 Returned value Interpretation -1 $a is less than $b. 0 $a is exactly the same as $b. 1 $a is greater than $b.