This page lists all known errors and their corrections for the most recent (fourth) printing of the book. The errors in the first printing are given here and the errors in the second and third printings are given here. If you find any new errors, please notify one of the authors. We use the following notation for the corrections: positive line numbers start counting from the top of the text body; negative line numbers start counting from the bottom (including footnote text).
The authors wish to thank the following people for their help in finding errors in the book since the first printing: Hassan Aït-Kaci, Stefan Andrei, Cosmin Arad, Shannon Behrens, Christopher Campbell, Raphaël Collet, Arnaud Dagnelies, Olivier Danvy, Juan Francisco Diaz, Isabelle Dony, Robert Godfroid, Jeff Jackson, John Johnson, Kent Johnson, Harish Karnick, Waclaw Kusnierczyk, Irene Langkilde-Geary, Erick Lavoie, Gary T. Leavens, Mark S. Miller, David R. Musser, Konstantin Popov, Chris Rathman, Fred Spiessens, and Tony Tanami Vågenes.
procedure sqr(a:integer);
begin
a:=a*a;
end;
var c:integer;
c:=25;
sqr(c);
browse(c); /* value of c unchanged */
with Oz translation:
proc {Sqr D}
A={NewCell D}
in
A:=@A*@A
end
local
C={NewCell 0}
in
C:=25
{Sqr @C}
{Browse @C} /* content of C unchanged */
end
This gives a more reasonable definition of sqr
and shows how to pass variables by value.
meth kill(X S)
if @alive then
if S==1 then @last=@ident
elseif X mod @step==0 then
alive:=false
{@pred setSucc(@succ)}
{@succ setPred(@pred)}
{@succ kill(X+1 S-1)}
else
{@succ kill(X+1 S)}
end
else {@succ kill(X S)} end
end
This works because the FIFO property guarantees
that the setSucc and setPred
messages arrive at their destinations before the kill messages.