This first edition was written for Lua 5.0. While still largely relevant for later versions, there are some differences.
The fourth edition targets Lua 5.3 and is available at Amazon and other bookstores.
By buying the book, you also help to support the Lua project.
Programming in Lua | ||
Preface |
The book encloses "literal strings"
between double quotes
and single characters, like `a
´, between single quotes.
Strings that are used as patterns are also enclosed between single quotes,
like '[%w_]*
'.
The book uses a courier font both for little chunks of code
and for identifiers
.
Larger chunks of code are shown in display style:
-- program "Hello World" print("Hello World") --> Hello WorldThe notation
-->
shows the output of a statement or,
occasionally, the result of an expression:
print(10) --> 10 13 + 3 --> 16Because a double hyphen (
--
) starts a comment in Lua,
there is no problem if you include those annotations in your programs.
Finally, the book uses the notation <-->
to indicate that something
is equivalent to something else:
this <--> thatThat is, there is no difference to Lua whether you write
this
or that
.
Copyright © 2003–2004 Roberto Ierusalimschy. All rights reserved. |