Errata

Beautiful Code

Errata for Beautiful Code

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
1.2
A Regular Expression Matcher Code Listing

In the code listing for the matchhere function in the chapter "A Regular Expression Matcher", a line reads:

returnmatchhere(regexp+1, text+1);

. I believe that the correct line is:

return matchhere(regexp+1, text+1);

Note from the Author or Editor:
The reader is correct. There should be a space after the return keyword. This problem exists only in the Safari version, not the printed book.

Anonymous  May 04, 2009 
Printed
Page 69
line 19

In the method "isHexDigit" the line:
case '@' : return true;
should read :
case '@' : return false;

Anonymous    Jun 01, 2008
Other Digital Version
69
line 19

In the method "isHexDigit" the line:
case '@' : return true;
should read :
case '@' : return false;

Anonymous    Jun 01, 2008
Printed
Page 121
5th paragraph 2nd to last complete sentence on page

Sentence reads "... has an opcode of Ldc_R8, which will load an 8-bit real (that is, a floating-point number) on the stack.

I believe 8-bit should be 8-byte.

Note from the Author or Editor:
The reader is correct. Please change "8-bit" to "8-byte" on p. 121

Anonymous  Nov 19, 2008 
Other Digital Version
132
Top Down Operator Precedence > Symbol Table > 9.2. Symbol Table; In the block of code at the top, change

return z;

to:

return s;

Anonymous    Jun 01, 2008
Printed
Page 271
bottom of page

In the following sentence:

Based on the definition of the struct usb_interface recently shown,
the dev variable is probably placed 16 bytes into the structure on a
32-bit processor.

Please change 16 to 14.

Anonymous    Jun 01, 2008
Other Digital Version
271
bottom of page

In the following sentence:

Based on the definition of the struct usb_interface recently shown,
the dev variable is probably placed 16 bytes into the structure on a
32-bit processor.

Please change 16 to 14.

Anonymous    Jun 01, 2008
Printed
Page 271
bottom of page

In the following sentence:

Based on the definition of the struct usb_interface recently shown,
the dev variable is probably placed 16 bytes into the structure on a
32-bit processor.

Please change 16 to 14.

Anonymous    Jun 01, 2016
Printed
Page 285
next-to-last line

The italicized umpafs should be umapfs.

Anonymous    Jun 01, 2008
Other Digital Version
285
next-to-last line

The italicized umpafs should be umapfs.

Anonymous    Jun 01, 2008
Printed
Page 285
next-to-last line

The italicized umpafs should be umapfs.

Anonymous    Jun 01, 2016
Printed
Page 296
2nd paragraph

It should be -1549758592 mod 32 as the number of slots is 32 and -1549758592 mod 31 is 11 not 0 (mod 32 is 0).

Note from the Author or Editor:
lease change "mod 31" to "mod 32" as the reader indicated.

Anonymous   
Printed
Page 459
while-block of parseXML() method

A parenthesis was dropped in a cast.

Statement

node = XPathAPI.selectSingleNode(root, String)xpathvals.next());

should be

node = XPathAPI.selectSingleNode(root, (String)xpathvals.next());

Note from the Author or Editor:
The reader is correct. Please make the requested change.

Anonymous  Aug 09, 2008 
Printed
Page 478
Example 29-1, in Java code

class Sample {}

public static void main(String[] argv) {
System.out.println("Hello World");
}

should be:

class Sample {

public static void main(String[] argv) {
System.out.println("Hello World");
}
}

Note that an extra { and } are added.

Anonymous    Jun 01, 2008
Other Digital Version
478
Example 29-1, in Java code

class Sample {}

public static void main(String[] argv) {
System.out.println("Hello World");
}

should be:

class Sample {

public static void main(String[] argv) {
System.out.println("Hello World");
}
}

Note that an extra { and } are added.

Anonymous    Jun 01, 2008
Printed
Page 478
Example 29-1, in Java code

class Sample {}

public static void main(String[] argv) {
System.out.println("Hello World");
}

should be:

class Sample {

public static void main(String[] argv) {
System.out.println("Hello World");
}
}

Note that an extra { and } are added.

Anonymous    Jun 01, 2016
Printed
Page 558
Last contributor on the page

"Simon Peyton Jones" is incorrectly alphabetized. His last name is "Peyton Jones" not "Jones". The same mistake also occurs in the index.

Anonymous    Aug 01, 2007