IF CommandThis 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. Command Definition:IF condition GOTO label IF condition THEN commands{s} {ELSEIF condition THEN command{s}} {ELSEIF condition THEN command{s}} {ELSE command{s}} ENDIF conditionA 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. The binary operators are:
All conditions are evaluated from left to right. labelA label defined in the current scope of the Script. commandAny 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 |
|
<<< prev page |
^^^ section start |
>>> next page |
Proud to be Open, prouder to be Free |
OpenSTA SCL Reference, version 2.0.6 Copyright & License Info on ToC page |
Last Updated: 2005-05-11 |