Revisions: 08/24/01; 11/19/04 -- format changes

CHAPTER 17 — Decisions

You have been learning the pieces that make up the QBasic programming language. (Similar pieces make up nearly all programming languages.) The past several chapters have told you that the only control structures you need to write any program are:

  1. Sequential Execution.
  2. Loops.
  3. Two-way Choice.

You may have been puzzled that two-way choice is one of the structures. What if a program needed to choose between more than two options?

It turns out that a choice between many options can be done by using several two-way choices. This is the main topic of this chapter. Although it looks easy enough, it can get quite complicated, so follow carefully!

Chapter Topics:


What did you drink for breakfast this morning? Coffee, tea, or milk?