Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
45Activity
0 of .
Results for:
No results containing your search query
P. 1
Programming in LUA

Programming in LUA

Ratings:

4.8

(5)
|Views: 2,270 |Likes:
Published by api-3733494

More info:

Published by: api-3733494 on Oct 15, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Programming in Lua
Roberto Ierusalimschy
January 22, 2003
2
Contents
1 Introduction
7
I The Language
11
2 Getting Started
13
2.1 Environment and Chunks. . . . . . . . . . . . . . . . . . . . . . 14
2.2 Some Lexical Conventions. . . . . . . . . . . . . . . . . . . . . . 16
3 Types and Values
19
4 Expressions
27

4.1 ArithmeticOperators. . . . . . . . . . . . . . . . . . . . . . . . 27 4.2 RelationalOperators. . . . . . . . . . . . . . . . . . . . . . . . . 27 4.3 LogicalOperators. . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4 Concatenation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.5 Precedence. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.6 TableConstructors. . . . . . . . . . . . . . . . . . . . . . . . . . 29

5 Statements
33

5.1 Assignment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 5.2 Local Variables and Blocks. . . . . . . . . . . . . . . . . . . . . 34 5.3 ControlStructures. . . . . . . . . . . . . . . . . . . . . . . . . . 35

6 Functions
41
7 More About Functions
45

7.1 Closures & Upvalues. . . . . . . . . . . . . . . . . . . . . . . . . 47 7.2 Variable Number of Arguments. . . . . . . . . . . . . . . . . . . 52 7.3 NamedParameters. . . . . . . . . . . . . . . . . . . . . . . . . . 53

8 Errors
55
8.1 ErrorMessages. . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8.2 Error Handling and Exceptions. . . . . . . . . . . . . . . . . . . 58
3

Activity (45)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
chesire71 liked this
JS17 liked this
Javier Barnés liked this
gerry liked this
gvnl4899 liked this
jmendenhall liked this
clementj liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->