PATH: Instructional Server> COP 2000> Examples> Repetition>

Outlined Algorithms for Generic Repetition Structures


This web page contains text-based alternatives to the first flowchart illustration shown in the web page The Repetition Control Structure (a.k.a. Looping). That illustration offers examples of two different control structures, "leading decision" repetition and "trailing decision" repetition. The first outline on this web page relates to the leading decision loop example. The final outline relates to the trailing decision loop example.

Leading Decision Loop Algorithm Outline (alternative to a flowchart)

It is important to clearly describe logical control structures that involve branching away from the simple sequential flow of steps and the conditions upon which they are based. Outlines are well suited to this task because of the hierarchical nature of their lettered and numbered steps. Analysts often employ indentation using tabs or spaces to help clarify step subordination. If your rendering software cannot indicate the presence of such "whitespace" characters, be give careful attention to the labeling of the steps to determine the subordination of the steps.

A. Start "Leading Decision Generic Loop Example"
B. While a logical condition is true do a loop pass:
   B.1. Loop body step 1.
   B.2. Loop body step 2.
   B.3. Etc.
C. End

Trailing Decision Loop Algorithm Outline (alternative to a flowchart)

It is important to clearly describe logical control structures that involve branching away from the simple sequential flow of steps and the conditions upon which they are based. Outlines are well suited to this task because of the hierarchical nature of their lettered and numbered steps. Analysts often employ indentation using tabs or spaces to help clarify step subordination. If your rendering software cannot indicate the presence of such "whitespace" characters, be give careful attention to the labeling of the steps to determine the subordination of the steps.

A. Start "Trailing Decision Generic Loop Example"
B. Do a loop pass:
   B.1. Loop body step 1.
   B.2. Loop body step 2.
   B.3. If a specific logical condition is true, do another loop pass.
C. End
PATH: Instructional Server> COP 2000> Examples> Repetition>