O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Traversing, Analyzing, and Generating Sequences of Data

When a program visits each element of a list of elements, programmers say the list is being traversed. Traversal is one of the most fundamental uses of iteration statements. The general loop construct for analyzing a list of data can be depicted by a flow chart or pseudocode as in Figure 9.1. Notice how the depiction matches our definition of an iteration statement presented in the beginning of the previous chapter: “An iteration statement repeats a statement or a block of statements until a given termination condition is met.”

Figure 9.1. An iteration construct used for analyzing a sequence of data elements.

Figure 9.2 illustrates the general framework for a loop generating a list of data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required