Errata in PIL4 on page 86

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Errata in PIL4 on page 86

Rob Edmunds
Hello,

I think I have found an error in the code on page 86. It states:

function rest (left, right, bottom, up)
return function (x, y)
return left <= x and x <= right and
bottom <= x and x <=up
end
end

I assume the "bottom <= x and x <=up" should actually be "bottom <= y and y <=up". I thought I would send this to you, incase you need it for the errata list.

Thank you for this fantastic book, I am really enjoying it. Keep up the great work!
Reply | Threaded
Open this post in threaded view
|

Re: Errata in PIL4 on page 86

Gavin Wraith
In message <[hidden email]>
          Rob Edmunds <[hidden email]> wrote:

>I think I have found an error in the code on page 86. It states:
>
>function rest (left, right, bottom, up)
>return function (x, y)
>return left <= x and x <= right and
>bottom <= x and x <=up
>end
>end
>
>I assume the "bottom <= x and x <=up" should actually be "bottom <= y and y
><=up". I thought I would send this to you, incase you need it for the
>errata list.

In my copy this correction has already been pencilled in so I must presume
that it has already been brought to public notice.

--
Gavin Wraith ([hidden email])
Home page: http://www.wra1th.plus.com/
Reply | Threaded
Open this post in threaded view
|

Re: Errata in PIL4 on page 86

Roberto Ierusalimschy
In reply to this post by Rob Edmunds
>
> I think I have found an error in the code on page 86. It states:
>
> function rest (left, right, bottom, up)
> return function (x, y)
> return left <= x and x <= right and
> bottom <= x and x <=up
> end
> end
>
> I assume the "bottom <= x and x <=up" should actually be "bottom <= y and y
> <=up". I thought I would send this to you, incase you need it for the
> errata list.

As Gavin pointed out, this was reported before. But you could not know,
because the book still doesn't have an errata :-)  I hope to fix this
soon. Thanks for the report, anyway.


> Thank you for this fantastic book, I am really enjoying it. Keep up the
> great work!

Many thanks :-)

-- Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Errata in PIL4 on page 86

Luiz Henrique de Figueiredo
The errata for PiL4 are now available at
http://www.lua.org/pil/errata.html

Thank you for the reports.