Structured Programming Techniques

The following sections explain each of the three structured programming constructs. Read them carefully and you'll see that the concept of a structured program is easy to understand. Learning about structure before learning a language should help you think of structure as you develop your programming skills.

Sequence

Sequence is nothing more than two or more instructions one after the other. Sequential instructions are the easiest of the three structured programming constructs because you can follow the program from the first statement to the last within the sequence. Figure 22.4 uses flowcharting to demonstrate sequence logic.

Figure 22.4. The sequence structured programming construct executes the program in ...

Get Absolute Beginner's Guide to Programming, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.