5.4.1.2 Nested DO Loops

A DO loop can contain one or more complete DO loops. The range of an inner nested DO loop must lie completely within the range of the next outer loop. Nested loops can share a labeled terminal statement (except for END DO statements, which cannot be shared).

Figure 5-2 illustrates correctly and incorrectly nested DO loops.

Figure 5-2 Nested DO Loops


Previous Page Next Page Table of Contents