1 / 367
文档名称:

Lua Press Programming in Lua 3rd (2013).pdf

格式:pdf   页数:367页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Lua Press Programming in Lua 3rd (2013).pdf

上传人:bolee65 2014/3/7 文件大小:0 KB

下载得到文件列表

Lua Press Programming in Lua 3rd (2013).pdf

文档介绍

文档介绍:Last update: Mon May 06 11:56:18 BST 2013 (build 28)
Programming in Lua
Third Edition
Personal copy of Santa Claus <******@>
Personal copy of Santa Claus <******@>
Programming in Lua
Third Edition
Roberto Ierusalimschy
PUC-Rio, Brazil

Rio de Janeiro
Personal copy of Santa Claus <******@>
Programming in Lua, Third Edition
by Roberto Ierusalimschy
ISBN 978-85-903798-5-0
Copyright
c 2013, 2003 by Roberto Ierusalimschy. All rights reserved.
The author can be contacted at roberto@ .
Book cover by Luiza Novaes. Lua logo design by Alexandre Nako. Typeset by
the author using LATEX.
Although the author used his best efforts preparing this book, he assumes no
responsibility for errors or omissions, or for any damage that may result from
the use of the information presented here. All product names mentioned in this
book are trademarks of their respective owners.
CIP – Biblioteca do Departamento de Informática, PUC-Rio
Ierusalimschy, Roberto
I22 Programming in Lua / Roberto Ierusalimschy. – 3th ed.
– Rio de Janeiro, 2013.
xviii, 348 p. : 25 cm.
Includes index.
ISBN 978-85-903798-5-0
1. Lua (Programming language). I. Title.
– dc20
Feisty Duck Digital
Book Distribution

Personal copy of Santa Claus <******@>
to Ida, Noemi, and Ana Lucia
Personal copy of Santa Claus <******@>
Contents
Preface xiii
I The Language 1
1 Getting Started 3
Chunks 4
Some Lexical Conventions 5
Global Variables 6
The Stand-Alone Interpreter 6
Exercises 8
2 Types and Values 9
Nil 10
Booleans 10
Numbers 10
Strings 11
Tables 15
Functions 18
Userdata and Threads 18
Exercises 18
3 Expressions 21
Arithmetic Operators 21
Relational Operators 22
Logical Operators 23
Concatenation 23
The Length Operator 24
Precedence 25
Table Con