|Ada 95 Quality and Style Guide||Chapter 5|
5.1.3 Exit Statements
Use loop names on all exit statements from nested loops.
See the example in 5.1.1.
An exit statement is an implicit goto. It should specify its source explicitly. When there is a nested loop structure and an exit statement is used, it can be difficult to determine which loop is being exited. Also, future changes that may introduce a nested loop are likely to introduce an error, with the exit accidentally exiting from the wrong loop. Naming loops and their exits alleviates this confusion. This guideline is also useful if nested loops are broken over a screen or page boundary.
|< Previous Page||Search||Contents||Index||Next Page >|