### 5.4.1.4 Extended Range

A DO loop has an extended range if it contains a control statement that transfers control out of the loop and if, after execution of one or more statements, another control statement returns control back into the loop. The range of the loop is extended to include all executable statements between the destination statement of the first transfer and the statement that returns control to the loop.

The following rules apply to using a DO loop extended range:

- A transfer into the range of a DO construct is permitted only if the transfer is made from the extended range of that DO construct.

- The extended range of a DO construct must not change the control variable of the DO construct.

Figure 5-3 illustrates valid and invalid extended range control transfers.

### Figure 5-3 Control Transfers and Extended Range

Previous Page Next Page Table of Contents