3. Module Overview
Flow of the program
Conditional constructs
If – Else If
Nested If
Switch Case
While Loop
For Loop
For Each
Exceptions
Summary
4. Flow Altering Constructs
Program execution follows a flow and order
The order of execution depends on the call &
condition
Conditional constructs & Looping
constructs
5. IF Statements
If Statements evaluates a condition and executes
the corresponding block
Elseif – for other conditions
6. Case Statements
An alternative for multiple if else blocks
Faster in execution
Evaluates multiple conditions in a single go
Variables, integers, strings can be checked in case
Select Case code
Case 1 ,2,3
Case expression
Case Else
7. Looping Constructs - For
For loop iterates the a single statement/block for n times
It includes a start, end & step counters
Evaluates a condition
Next keyword is used for incrementing and moving to the
next loop
Can be used to decrement the counter too
8. Looping Constructs - While
While works based on a condition
If the condition is true the loop is executed
Else it is exited
Do Loop – executes the loop once before evaluating the
condtion
9. For Each
For each loos thro the values instead of index
Useful for object iteration
Array iteration or collections
Jumping – Exit / Continue
10. Summary
Flow Controls
If
If else
Select case
While
Do while
For loops
For each
Summary