Tcl/Tk for Programmers, Errata

Here are some errors that have been found in TFP.

Found in 1998:

Web page references on page 1
Several of these are now dead links. See the online Chapter 1 for updated versions.

Section 2.10, page 23
The URL for the Unicode consortium is http://www.unicode.org/ not http://www.unicode.com/ (This is correct in the online version of section 2.10

Section 3.1, page 29
Although I expect almost all readers know that + is used for addition, - for subtraction, * for multiplication, / for division, and % for finding division remainders, I should have mentioned these arithmetic operators in this section.

Solution to Exercise 10.9a, page 203
This

set Digit_ {[0-9]}
set OneTwo_ {[12]}

should be

variable Digit_ {[0-9]}
variable OneTwo_ {[12]}

Section 10.10, page 192, item 1 in the list
The first sentence should read: "If the partial URL does not begin with a single slash, then the both the domain name and the directory of the context URL are used in forming the complete URL."

Section 10.10, page 192, item 2 in the list
The first sentence should read: "If the partial URL does not begin with a single slash, then the both the domain name and the directory of the context URL are used in forming the complete URL."

Page 513, 6th line from bottom of displayed code in Exercise 25.4a
change "(int *)NULL )" to "(int *)NULL

Page 518, Script 25.5b
Four places places +/l{...} should be replaced with a simple ellipses ...

Page 519, Script 25.5b continued
Three places places +/l{...} should be replaced with a simple ellipses ...

Introduction to Chapter 25, page 503, fourth paragraph
This doesn't make sense as written. Read the online version instead. (The only part of Chapter 25 which is online is the introduction.)

Found in 1999:

Section 10.4, p 177
Last paragraph beginning with "The exercises in this section involve ,,," should begin with "Exercise 10.4c involves ..."

Section 10.4, p 178, Exercise 10.4c
Strike the line "Make the channel nonblocking and, if necessary". Also, change the sentence "When the last I/O channel has closed, the program will stop with an error message." to "When the last I/O channel has closed, the script will stop with an error message under Unix and wait forever for more events under Windows."

Section 10.11, page 195, solution to exercise 10.4b
Change put to puts.

Section 25.5, page 516, explanation of Tcl_GetCommandInfo
Mention should be made that the return value is boolean, true iff a procedure named Name is found.

Section 8.2, page 137, explanation of -translation switch
Add: "If your I?O channel does both reading and writing, see your manual for how to control each direction separately."

Section 10.11, pages 204-205, solutions to 10.9b and 10.9c
PARTICIPATE, FAVORITE, and COMMENT should be in lower case. Also, the possibility that A(http) does not exist when there is no message in A(error) is not taken care of. Further, the CGI script at this web site for exercise 10.9b was not working for a while.

Found in 2000:

Section 2.5, page 26, the two small examples just before Exercise 2.5a
The first of these examples erroneously shows $X as not being substituted. Fix by replacing both examples with this
% set X OK
OK
% puts {$X}
$X
% puts 1{$X}1
1{OK}1
% puts {$X}1
extra characters after close-brace

Section 2.9, Exercise 2.9b
0==[gets stdin] should read 1==[gets stdin]

Section 2.11, Solution to Exercise 2.9b
0==1 should read 1==0

From Software Build and Fix | Related To Zimmers'Tcl/Tk Page | Author J Adrian Zimmer

Wed Jan 12 10:12:31 CST 2000