Control Statement
Control Statement
STATEMENT
Control statement refers to the statement or
command used to change the order of
execution of statements or repeat a group of
statements until a certain specified
conditions are met .
SYNTAX :
IF<condition> THEN <statement1>ELSE
<statement2>
IF….ELSEIF…ENDIF
IF…ELSEIF…ENDIF is used to execute a
statement or block of statement if the if
condition is true or ELSEIF condition will be true
then statement 2 will be executed otherwise
ELSE statement will be executed.
SYNTAX :
IF<condition> THEN <statement1>
ELSEIF<condition2>THEN
<statement2>
SELECT CASE…END SELECT
SELECT CASE…END SELECT statement is control
flow statement that executes one of the several
statement blocks depending upon the value of
an expression .
SYNTAX : SELECT CASE <expression>
CASE 1
statements
CASE 2
statements
CASE ELSE
statements
LOOPING
STATEMENT
Syntax:
WHILE <condition>
<statements >
WEND
WHILE .. WEND
FOR ….NEXT ..