Introduction to the CSD - Iteration

Iterative statements, no matter the form, are all respresented identically in the CSD: an elongated loop denotes the beginning and the end of the iterative section of code, as shown below. The figure below shows the CSD for the three types of loops found in Ada, the for loop, the while loop, and the basic loop.

The potential for a loop to be exited prematurely via an exit condition is denoted by an arrow which points to the control level where the program should continue its execution after the loop ends.


Prev Page | Next Page

Return to GRASP Documentation Page