next topic    back to Rev 1 index

Topic 6

Main programming constructs:



Sequence:
This form of construct involves executing the code in order from top to the bottom of the program. The code starts executing from line 1, then line 2 and so on until the last line of the program.

Selection:
This form of construct involves executing some lines of code only if the condition is met, otherwise the program ignores these lines of code and jumps over to the next block code. This form of construct is achieved using IF statements, IF-ELSE statements, IF-ELSE-IF-ELSE statements and SWITCH statements.

Iteration:
This form of construct involves repeating some lines of code a certain number of times or until the condition is met. This form of construct is achieved using FOR loops and WHILE loops.


next topic     back to Rev 1 index