[Ada Information Clearinghouse]
Ada '83 Rationale, Sec 3.7: Statements

"Rationale for the Design of the
Ada® Programming Language"

[Ada '83 Rationale, HTML Version]

Copyright ©1986 owned by the United States Government. All rights reserved.
Direct inquiries to the Ada Information Clearinghouse at adainfo@sw-eng.falls-church.va.us.

CHAPTER 3: Classical Programming

3.7 Statements

The classical forms for sequential processing are included in Ada: assignment statements, procedure call statements, if and case statements, loop statements, and (control) transfer statements. Less classical control structures, such as the raise statement and the statements used for tasking, are discussed in later chapters.

It is customary to distinguish simple and compound statements: a simple statement contains no other statement; compound statements may include other sequences of statements.

The Ada syntax is such that wherever a single statement may appear, a sequence of several statements may also appear. This simplifies program modification since insertion of a statement can be done without the need to insert extra begin and end markers (as was the case in Algol and Pascal).

A sequence of statements contains at least one statement: an empty sequence is not allowed. For readability reasons, Ada provides an explicit null statement for situations where other languages would use (implicit) empty statements. For example, if nothing needs to be done for a given alternative of a case statement, it is preferable to state this explicitly by a null statement:

case TODAY is
  when TUE  | THU | SAT    => null;
  when MON  | WED |
       FRI  | SUN     => ACTION;
end case;

rather than convey the same impression by an empty statement which could be taken as an unintentional omission, as in the Pascal formulation given below:

case TODAY of
  TUE, THU, SAT : ;

Address any questions or comments to adainfo@sw-eng.falls-church.va.us.