IF
StatementIn this chapter we show you how to represent decisions in algorithms by writing
steps with two or more alternative courses of action. You will see how to
implement conditional execution in Ada by using Boolean conditions and the Ada
IF
statement. This chapter provides many examples of program
fragments containing IF
statements.
This chapter also introduces you to the process of writing simple reusable functions and putting them in packages for later use by yourself and others. This continues the practice begun in Chapters 2 and 3, in which each chapter introduces new material that will help you structure small program units but also shows you immediately how to integrate this new material into larger, system-level units. In this way you will always focus your attention on the two equally important problems of building individual programs and building libraries of programs into systems.
Copyright © 1996 by Addison-Wesley Publishing Company, Inc.