![]() |
James Thornton |
| Internet Business Consultant |
| Home | Blog | Bio | Projects | Contact | Latest Blog (new site): How to Get to Genius |
|---|
|
10.2. Nested LoopsA nested loop is a loop within a loop, an inner loop within the body of an outer one. What happens is that the first pass of the outer loop triggers the inner loop, which executes to completion. Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop finishes. Of course, a break within either the inner or outer loop may interrupt this process. Example 10-19. Nested Loop
See Example 26-11 for an illustration of nested "while" loops, and Example 26-13 to see a "while" loop nested inside an "until" loop. |
|
James Thornton, jamesthornton.com>Services: Unix Programmer |
Electric Speed: Software Programming |