Errata for Literate Programming (last updated 31 December 2002)

Most of the corrections below were made in the third printing; all of them except those marked with an asterisk (*) were made in the fourth printing.

*Page v, line 2 from the bottom

Sons Ltd. Sons, Ltd.

*Page 2, line 13 When Communications … 1959 Shortly after Communications of the ACM began publication in 1958 Page 9, line 6 when in when *Page 12, line 11 from the bottom craftman’s work craftsman’s work *Page 14, bottom line ming.” ming,” *Page 15, line 19 119-150 119–150 *Page 26, line 17 from the bottom while A[i] ≠ x do while A[i] ≠ x do *Page 32, line 10 from the bottom i := i − 1 i := i − 1; *Page 36, line 15 PL360 [96] PL360 [96]) Page 38, line 16 from the bottom Bohm Böhm *Page 40, line 11 A[j] := x; A[j] := x; L[j] := 0; R[j] := 0; j := j + 1; Page 41, line 10 from the bottom ⟨ situation ⟩_{n}; ⟨ situation ⟩_{n}: *Page 42, lines 10 and 12 from the bottom i := L[i] i := L[i]; i := R[i] i := R[i]; *Page 43, line 1 5c 5c *Page 43, lines 22 and 24 goto go to Page 44, line 15 from the bottom absent; absent: *Page 45, lines 11 and 12 from the bottom print print *Page 47, line 21 do S do S until B until B *Page 47, line 14 from the bottom If S is If S is Page 48, line 13

[94] [95] Page 49, line 10 from the bottom \{Q ∧ B\} \{Q ∧ \overline{B}\} *Page 50, line 7 repeat: repeat; Page 51, lines 6 and 7 from the bottom recursion wasn’t … table of contents. the recursion chapter wasn’t Chapter 3, since it belongs conceptually near the very beginning. *Page 52, line 1 on the Example 6 on Example 6 Page 60, line 17 A[j]then A[j] then *Page 60, line 19 i := i + 1 i := i + 1; Page 60, line 9 from the bottom repeat go repeat; go Page 64, bottom line A[j] < v A[j] > v *Page 69, line 14 if tests if tests *Page 72, line 15 from the bottom [12]. [12].) *Page 81, line 2 from the bottom

    FOUND; FOUND;

*Page 82, line 17

GOTO’ GOTO

Page 83, line 3 Bohm Böhm *Page 83, line 8 from the bottom humble programmer,’ humble programmer,” *Page 83, line 5 from the bottom [Ed]. [Ed.] *Page 85, line 20 Practice and Experience Practice & Experience *Page 85, line 8 from the bottom A review of ‘Structured Programming’, “A review of Structured Programming,”

*Page 86, lines 14 and 15 Journal of the ACM 27 (1980), 123–127. Journal of the ACM 27 (1980), 123–127.] *Page 86, line 21 site de Liege, Service Informatique, Liege sité de Liège, Service d’Informatique, Liège *Page 87, bottom line York:Springer York: Springer *Page 88, line 5 Practice and Experience Practice & Experience *Page 89, line 7 14, 4 14,4 Page 89, line 13 Progamming Programming *Page 91, line 6 from the bottom “i precedes j”. “i precedes j.” *Page 95, lines 16 and following all these lines (except the line 8 from the bottom) should be indented one quad less *Page 97, line 15

ACM14 ACM 14

*Page 101, line 13 ADA Ada Page 109, line 9 \sqrt{k}/ln k \sqrt{k/ln k} Page 127, line 12 beings begins Page 132, line 23 gave a DOC gave DOC *Page 135, lines 8 and 9 from the bottom Liege, Service D’informatique (December, 1973). Liège, Service d’Informatique (December, 1973), 135 pp. *Page 135, line 6 from the bottom (Eds.) [Eds.] *Page 144, line 10 of section 1 It’s (It works also when M = N; but the average running time is of order M + N(H_{N} − H_{N−M}), which is linear in M for M ≤ \frac{1}{2}N but not when M approaches N. Users who want M > \frac{1}{2}N should generate the complementary set of N − M integers.) It’s Page 145, line 7 populatation population Page 149, additional closing paragraph

In a subsequent “Programming Pearl,” David Gries contributed his own version of the sampling program above, with independent proofs of the properties of ordered hashing for which §9 had simply given a brief reference to the literature. See Communications of the ACM 30 (April 1987), 284–289.

Page 151, line 4 [Chapter 8] [Chapter 5] *Page 157, line 10 from the bottom pu-ter put-er Page 160, line 10 from the bottom ≈ .61803trie size ≈ .61803(trie size − 52) *Page 204, and also pages 214, 216, 218, 224, 262 [Adjust the spacing so that the top lines are aligned properly.] *Page 231, line 13 p_{1} … p_{l} p_{1} … p_{l−1} Page 237, line 22 idea idea idea Page 240, line 18 inconsistences inconsistencies *Page 249, line 17 on February 1, early in February, Page 258, restore a missing line after Figure 1 Then TEX suddenly had more than one user, and different kinds of Page 271, line 12 thesis [11] thesis *Page 287, line 17 form. form.^{4} *Page 287, new bottom line

4 (Footnote added March 1999) See Digital Typography, Chapter 34.

*Page 291, line 2 1986) 1986), *Page 294, line 2 debugging debugging *Page 310, entry 409

vfil  \vfil

*Page 310, entry 418

topmark  \topmark

*Page 311, entry 434 1352. 1352 Page 316, entry X102 1078 §1078 (and it belongs in the next-to-last column) Page 316, entry X105 shawing showing *Page 321, entry X332

sprint_cs sprint cs

*Page 341, line 11 135–137 134–137 *Page 349, bad hyphenation on lines 9 and 10 Praktis- che Prak- tische *Page 353, line 5 from the bottom (1965) (1985) *Page 354, line 10 from the bottom Oppermann), Oppermann),” *Page 355, line 15 pu-ter put-er Page 357, after line 2 Ben Ross Schneider Jr., “Programs as essays,” Datamation 30,7 (May 15, 1984), 162–168. Page 362, left column Gries, David Joseph, 149, 350. *Page 362, Hoare entry 82, 83–84 82–84 *Page 363, right column Lavagnino, John David, 338. Leeuwen, Marcus Aurelius Augustinus van, 293, 338–339. Levy, Silvio Vieira Ferreira, xii, 337, 341, 355. LISP, 55, 101, 356. Page 363, entry for linking two way two-way *Page 365, left column Perlis, Alan Jay, 1, 14, 24. Page 366, left column Schneider, Ben Ross, Jr., 357. Page 367, left column Sullivan, Wayne Garrett, 293, 337–339. Page 367, left column Thimbleby, Harold William, 133, 136, 355, 357. Page 368, left column, Winkler entry v vii