Controlling Script Execution
AutoWeb has the ability to conditionally execute statements, skip statements, and repeat statements based on the current situations it encounters as script is executed. These special statements are called Flow Control statements. They control the flow of script execution.
Flow Control Statements:
|
If <condition> |
The IF Flow Control statement allows a set of statements to be executed if the specified Condition is true and skipped if the Condition is false. Optionally a set of alternate statements can be executed if the Condition is false by using the 'Else' clause and supplying a set of statements. IF Flow Control statements can be placed within other Flow Control statements (nested). |
|
The WHILE Flow Control statement allows a set of statements to be executed repeatedly as long as the Condition is true. WHILE Flow Control statements can be placed within other Flow Control statements (nested). |
|
|
The FOR Flow Control statement allows a set of statements to be executed repeatedly based on a range of values for <IntVar> beginning with <start> and ending with <end>. FOR Flow Control statements can be placed within other Flow Control statements (nested). |
Flow Control within a Statement (Precedence)
Conditions
Conditions are expressions that can be evaluated to either TRUE or FALSE and are used with IF and WHILE statements. Conditions can be simple or more complex. AND, OR, NOT and Parenthesis can be used to make complex conditions. (see Comparing Values in the User Guide)