Previous topic | Ada Home Page | Index

Nested loops

Often we have loops within each other (nested loops).

This is used when we want to do something multiple times, and then do that multiple times. Examples are:

Programming process:

  1. design and test inner loop
  2. design and test outer loop

An example program shows how to print a two-dimensional table: the times table for the numbers 1-10. The outer loop handles each row in turn; the inner loop handles the columns within each row.


Previous topic | Ada Home Page | Index
c-lokan@adfa.oz.au / 14 Feb 96