Having examined the syntactic details of the control flow statements we can now focus our attention on the way we can reason about them at an abstract level.
The first thing you should remember is to examine one control structure at a time, treating its contents as a black box. The beauty of structured programming is that the control structures employed allow you to abstract and selectively reason about parts of a program, without getting overwhelmed by the program's overall complexity.
Consider the following code sequence.
Although we have removed a large part of the 20 lines of code, the loop still appears quite complex. However, the way you should read the above loop is
At that level of abstraction you can then focus on the loop body and examine its functioning without worrying about the control structure in which it is enclosed. This idea suggests a second rule we should follow when examining a program's flow of control: treat the controlling expression of each control structure as an assertion for the code it encloses. Although the above statement may appear obtuse or trivial, its significance to the understanding of code can be profound.