Errors found in "Programming Languages: Design and Implementation" Fourth Edition by Terrence W. Pratt and Marvin V. Zelkowitz ISBN 0-13-027678-2, Prentice Hall, Upper Saddle River, NJ, 2001 P. 102, Perl program in middle of page: Delete keyword "then" before { print "yes\n";} P. 218, table in middle of page +--------------+--------------+ | VO | alpha-4 | +--------------+--------------+ For the slice A(*,2) at bottom of page: +--------------+--------------+ | VO | alpha-2 | +--------------+--------------+ P. 219, Delete ; in Perl print statement near bottom. Should be ... [$i]\n"}; Last two lines of page: a hash table by key. This allows for an efficient hash search of the keys to find a match when the array is accessed. P. 231, 6 lines from bottom: Replace /ldots by ... P. 278. Second paragraph from the top. "from class elemtype" must be changed to "from class ElemStack". P. 290, 6 lines from bottom Delete text: /indexHeap P. 306, near bottom. List of 3 possible values should be following list of 4: 1. Evaluate left to right: 1x3+2=5 2. Evaluate right to left: 1+3x2 = 7 3. Evaluate a only once: 1x3+1=4 4. Call fun(x) before evaluating a: 3x2+2=8 P. 312. In Fig. 8.5 (a) Syntax. In program the operator "if(something} break;" must be "if(something) break;" ("}" becomes a ")"). P. 315, Language Summary 8.3: last line of Example Figure 8.6 gives a brief overview of COBOL syntax. P. 362, Example 9.1 Figure 9.6 shows a simple Pascal subprogram ... P. 375, Last line before section 9.3.1 Remove sentence: In the nect chapter we separately cover the concept of inheritance and replace with: Chapter 7 already discussed inheritance. P. 380. The end of section "Call by result". "The call will be written as mysubroutine(&i) to a procedure declared myprocedure(int * i)..." must be "The call will be written as mysubroutine(&i) to a procedure declared mysubroutine(int * i)...". P. 387, 6 lines from bottom. "X in P" should be "x in P" P. 403, Figure 9.23 Rightmost dotted lines in figure should be solid lines P. 428, Example 10.1 All references to Figure 5.9 should be changed to Figure 10.3. P. 485, Second item in list in middle of page: Reference to Figure 8.2.1 should be to Language Summary 8.2. P. 487, Line 9 ... of the Forth program given in Language Summary 8.2, with a picture ... P. 491. Third paragraph from the foot of the page: instead "Transmission Control Program" must be "Transmission Control Protocol". P. 501. Third paragraph from the foot of the page instead " tag" to "action attribute of the
tag" P. 648, Index. Insert between Threads of control, 445 and Time sharing, 8 Thunk, 378 Errors found in "Programming Languages: Design and Implementation" Third Edition by Terrence W. Pratt and Marvin V. Zelkowitz ISBN 0-13-678012-1, Prentice Hall, Upper Saddle River, NJ, 1996 Errors in the book: P. 159, last line. Formula should be: lvalue(A[I,J]) = VO + I*3 + J*1 P. 160, Table at top. VO should be alpha-3 (not alpha-2) P. 190, Problem 14. Declaration should be A: array[...] not V: array[...]. P. 229 Example 5.1. References in this example to Figure 5.8 really refer to Figure 5.9. P. 301, Figure 7.4 The symbols /* and */ are not proper comment delimiters for Pascal. These should be changed to { and } or to (* and *). Declaration var I: integer; should be deleted in figure 7.4(b) P. 304, Figure 7.5 The text: end procedurename in Pascal should be written as end {procedurename}. These should be changed throughout figure. P. 306, 6 lines from bottom Should be: As Q executes, the first statement references X and prints ... ^^^ P. 307, Figure 7.7 See error above from page 304. P. 338, Figure 7.18 See errors above from pages 301 and 304. P. 595, Last paragraph, first line -- misspelling: ... total computing environment of a special-purpose ^^^^^^^ The following errors were found in the first printing and were corrected in later printings: Title page, Last Line Should read: Upper Saddle River, New Jersey 07458 Library of Congress data page Should read: Upper Saddle River, New Jersey 07458 All rights reserved. Next paragraph: "research" and "their" spelled incorrectly. P. 79, Section 3.3, Line 7 Delete space at beginning of line. P. 104, To remove ambiguity in question, change problem 6 to read: Which of the following speakers is masquerading as a monkey? (The answer given in the "Instructor's Guide" is wrong. Even one of the authors misread this question.) P. 191, Last line of problem 19. It should be R.K, not R.K., P. 280, Figure 6.12 (a) This flowgraph is not a prime; it is two primes, the leftmost half contains 6 nodes and the remainder. If the left join node is moved to the top of the graph, then it will be a prime. P. 284. Problem 3. (a): Delete ")" symbol. (c) Change "not" to "!". P. 446. Problem 9. The first line of the program should be: q:= 0; (Not q:=B). P. 480. Letters tb above Figure 10.5 should be deleted. P. 601. ML. As Figure 13.4 shows, the book was written using Standard ML of New Jersey, Version 0.93 as a guide. However, in the newer version 108, a "char" data type was added. #"a" is character 'a'. Several builtin functions have been changed. For example, 'explode' now returns a list of char, 'implode' takes a list of char as an argument, and 'ord' takes a char argument. Because of this change, when using version 108, the sample program in Figure 13.5 no longer works because of the use of 'ord' on line 2, 'explode' on line 7, 'print' on line 5, which needs a string argument, and the call to 'digit' on line 10, which also needs a char argument. The following is a version of Figure 13.5 that does execute on SML version 108: fun digit(c:char):int = ord(c)-ord(#"0"); (* Store values as a list of characters *) fun SumNext(V) = if V=[] then (print("\n Sum="); 0) else (print(implode([hd(V)])); SumNext(tl(V))+digit(hd(V))); fun SumValues(x:string):int= SumNext(explode(x)); fun ProcessData() = (let val infile = open_in("data.sml"); val count = digit(hd(explode(input(infile,1)))) in print(SumValues(input(infile,count))) end; print("\n")); This is another example showing the problems that can occur when standard definitions do not exist for languages. P. 604. Add after discussion on "tuple." A "record" in ML uses the syntax {label1=value, label2=value,...}, with components selected by the #label operator. Tuples are actually special cases of records. The tuple (10, 23, "a") is an instance of the record {1=10, 2=23, 3="a"}. P. 613. Add to "Other Functions" #i returns the ith component of a tuple. P. 641, Index Missing terms or errors: Bohm C., 282 COBOL, 272 Languages APL, 246 C+-, 552 COBOL, 272 Forth, 248 SNOBOL4, 255