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>
 <true statements>
Else
 <false statements>
EndIf

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).

While <condition>
 <true statements>
EndWhile

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).

For <intVar> = <start> To <end>
 <true statements>
EndFor

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)
Parenthesis can be used to alter the normal left to right evaluation of expressions within a statement. Parenthesis are always used in pairs of Open and Close parenthesis, Parenthesis can be placed within other parenthesis (nested).
Example: intVal is 22 in the following statement:
 intVal = 4 * 5 + 2
By using parenthesis intVal is 28 in the following statement:
 intVal = 4 * (5 + 2)

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)

Hosted by www.Geocities.ws

1