IF Command
Description:
This command performs tests on the values of variables against other variables or literals, and transfers control to a specified label depending upon the outcome of the tests.
Alternatively, structured IF commands may be used to perform one or more commands depending upon the success or failure of the tests.
By default, the matching is case sensitive. The strings "London" and "LONDON", for example, would not produce a match, because the case of the characters is not the same. This can be overridden by specifying the ", CASE_BLIND" clause.
Format:
1. IF condition GOTO label 2. IF condition THEN commands{s} { ELSEIF condition THEN command{s} } : : { ELSEIF condition THEN command{s} } { ELSE command{s} } ENDIFParameters:
condition
A condition of the following format:
{NOT}(operand1 operator operand2 {, CASE_BLIND}) &
{AND/OR condition ...}The two operands may each be a variable, a quoted character string or an integer value.
The option "CASE_BLIND" may be specified for "operand2", to request a case-insensitive comparison of the operands.
"NOT" inverts the result of the bracketed condition that it precedes.
All conditions are evaluated from left to right.
label
A label defined in the current scope of the script.
command
Any number of script commands - including further IF or DO commands, provided that the maximum nesting level of 100 is not exceeded.
Example:
IF ( NOT(isub=10) AND (NOT(isub=99)) ) THEN LOG "...continued" ELSE LOG " Completed loop" ENDIF
OpenSTA.org Mailing Lists Further enquiries Documentation feedback CYRANO.com |