Compares two strings.
strcompare <string1> <string2>
Compares two strings. Depending on the relation between them, one of the following result code is returned in the system variable "result":
Relation | Result |
---|---|
<string1> < <string2> | -1 |
<string1> = <string2> | 0 |
<string1> > <string2> | 1 |
; result = -1 strcompare 'abc' 'def' strcompare command 'next' if result=0 goto label strcompare command 'end' if result=0 end