IF ... THENPerforms an action if a condition is true.
Description:
In a single line IF statement, if the expression is true, the action following the THEN is taken. If the expression is false, execution continues with the statement following the IF statement.
The following statements are not allowed in single line IF ... THEN statements:
To construct a block IF statement, no action is allowed after the THEN on the IF statement and the block structure must end with an END IF statement. Only a block IF allows the optional ELSE statement. If the expression is true, the statements between IF ... THEN and ELSE are executed. Control then continues with the statement following the END IF statement. If the expression is false, the statements between ELSE and END IF are executed.
HTBasic also has an explicit ELSE IF statement, but note that it may be preferable to use SELECT CASE.
See Also:
|