Summary -
In this topic, we described about the Programming Construction with detailed example.
Application program is a set of executable statements. In a day to day needs, the program executing flow needs a change like below -
- Some part of the code needs to be executed in sequence.
- Some part of the statements needs to execute based on conditions.
- Some part of the statements needs to be executed repeatedly.
Based on the above needs, programming construction mainly divided into below three types –
Approach | Description |
---|---|
Sequence Programming Construction | Sequence programming construction involves in making the program execution in sequence. In sequence programming construction, the statements executed one by one in the order how they coded. |
Selective Programming Construction | Selective programming construction involves making the set of statements runs in conditional/selective manner. In selective programming construction, the statements execution decides by a condition. |
Iterative Programming Construction | Iterative programming construction involves making the set of statements runs in repetitive/iterative/looping manner. In iterative programming construction, the statements execute repeatedly until the specified condition is true. |
Every COBOL statement fits to any of the above three programming constructions.