Errata

Programming and Problem Solving with Ada 95
2nd Edition

Nell Dale, Chip Weems, and John McCormick

Please report any errors to: mccormick@cs.uni.edu

Programming and Problem Solving with Ada 95 cover art


Page
 


Correction  (changes shown in bold)
 

61

Figure 2-1  Replace Valve with Value

106

Answer to exercise 15 is missing a comma.  Aft => 2,

108

Exercise 6.  Use the definition of enumeration_literal_specification

111

Add the following sentence to exercise 20.

Assume default values of 2, 5, and 3 for Fore, Aft, and Exp if no values are specified.

140

Declaration of the two file variables have a blank where there should be an underscore

In_MPG  : Ada.Text_IO.File_Type;
Out_MPG : Ada.Text_IO.File_Type;

143

Under the first paragraph of Finishing Up, the second call to procedure Close has a blank where there should be an underscore

Ada.Text_IO.Close (File => Out_MGP);

163

Exercise 9.

Replace comma with period in the next to the last line of code segment
Ada.Integer_Text_IO.Get (Item => C);

Add missing semicolon to last line of code segment.
Ada.Text_IO.Skip_Line;

223

Exercise 7. Missing right parenthesis on the 2nd Boolean expression in the second column.

(2) not ((X<=Y) or (Y<Z)
)

243

Add a colon after the loop label in the code fragment at the top of the page
Count_Positives:

The label on the end statement for the same loop is incorrect.  It should be
end loop Count_Positives;

274

Exercise 5.  Lines 9 and 14 should be terminated with semicolons

Ada.Integer_Text_IO.Put (Item => J);
K := K + 1;

369

Exercise 25 should read function Passenger_Moment, not procedure Passenger_Moment

376

The data shown for number of pints produced by each farm is off by a factor of 10.  For example, Orville's Acres should be 438,010 not 43,801.

432

Quick Check question #8 should refer to the subtype Digit_Type described in question 7 (not question 6). 

580

Exercise 9. The package instantiation and variable declaration should read

package Complex_IO is new Ada.Direct_IO (Element_Type => Complex_Type);

C : Complex_Type;

764

Exercise 17.  The procedure to trace is Binary_Search on page 736.

A77

Second line of answer for Chapter 3 Exam Preparation question 9 should be

5.0 Hello

A84

Answer to Chapter 6 Programming Warm-up Exercise question 11 should be

procedure Get_Average (Dept_Num : in  Integer;
                       Avg      : out Float) is

A92

The parameters in the answer to Chapter 12 Exam Preparation Exercise question 4c should be

function "<" (Left  : in Customer_Accounts.Customer_Rec;
              Right : in Customer_Accounts.Customer_Rec)