IFNSTRCMP Branch to label if two strings do not match |
Top Previous Next |
This script command compares two strings and branches to [ label ] if they are not exactly the same.
Use the alternate IFNSTRCMPI command to perform the same comparison but to ignore case during the comparison. Unlike the UPPER and LOWER commands, IFNSTRCMPI does not change the case of the strings.
Consider the following example in which the script file accepts a string from a user prompt and branches to a label if the string is not what is expected.
PROMPT serial_number "Enter serial number" IFNSTRCMP serial_number "010101" GOTO invalidnumber
Related command(s): IFSTRCMP, IFSUBSTR, IFNSUBSTR, UPPER, LOWER
|