write(page)
should be
io.write(page)
rect
bottom <= x and x <= up
should be
bottom <= y and y <= up
signal
should be
sign
last
should return to -1,
not to zero.
quote
is wrong.
(In particular, it gives a wrong result for "]]").
A possible fix is to use the pattern "]=*"
in string.gmatch
.
\x\hh
should be
\xhh
else if
should be
elseif
"Write a function integral
that
receives a function f
and returns its definite integral function.
This returned function,
when given two values a
and b
,
returns
an approximation of the integral of f
from a
to b
"
"As we already mentioned, linked lists are not frequent in Lua, but sometimes we need them."
However, the book did not mention linked lists before this point.
allwords
should be
allwords()
(a function call)
__leq
should be
__le
local f = mod.foo
should be
local f = m.foo
local i = complex.new(0, 1)
should be
local i = new(0, 1)
if bit32.or(a, b) == bit32.or(-1) then
should be
if bit32.bor(a, b) == bit32.bor(-1) then
unexpandTabs
reported by Tomas Guisasola
s = expandTabs(s)
should be
s = expandTabs(s, tab)
io.lines
cannot accept a file handle as
its first argument.
local f = io.input(arg[1]) -- open input file
loadstring
should be
load
lua_pcall
should be
lua_call
lproc
described in this section:
a few missing #include
s and
the use of two deprecated entities,
luaL_reg
and luaL_register
.
See the correct code for
the complete example.
No errata available.
See
this page
for the errata for the printed version.
All corrections listed in the errata have been made in the
online version.