33< HEAD >
44< TITLE > Lua 5.1 Reference Manual - contents</ TITLE >
55< LINK REL ="stylesheet " TYPE ="text/css " HREF ="lua.css ">
6- < META HTTP-EQUIV ="content-type " CONTENT ="text/html; charset=iso-8859-1 ">
6+ < META HTTP-EQUIV ="content-type " CONTENT ="text/html; charset=utf-8 ">
77< STYLE TYPE ="text/css ">
88ul {
99 list-style-type : none ;
10- list-style-position : outside ;
1110}
1211</ STYLE >
1312</ HEAD >
2019Lua 5.1 Reference Manual
2120</ H1 >
2221
23- This is an online version of
22+ < P >
23+ The reference manual is the official definition of the Lua language.
24+ For a complete introduction to Lua programming, see the book
25+ < A HREF ="http://www.lua.org/docs.html#pil "> Programming in Lua</ A > .
26+
27+ < P >
28+ This manual is also available as a book:
2429< BLOCKQUOTE >
2530< A HREF ="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20 ">
2631< IMG SRC ="cover.png " ALT ="" TITLE ="buy from Amazon " BORDER =1 ALIGN ="left " HSPACE =12 >
@@ -29,128 +34,119 @@ <H1>
2934< BR > by R. Ierusalimschy, L. H. de Figueiredo, W. Celes
3035< BR > Lua.org, August 2006
3136< BR > ISBN 85-903798-3-3
32- < BR > < A HREF ="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20 ">
33- < IMG SRC ="amazon.gif " ALT ="[Buy from Amazon] " BORDER =0 > </ A >
3437< BR CLEAR ="all ">
3538</ BLOCKQUOTE >
36- < P >
3739
38- Buy a copy of this book and
40+ < P >
41+ < A HREF ="http://www.amazon.com/exec/obidos/ASIN/8590379833/lua-indexmanual-20 "> Buy a copy</ A >
42+ of this book and
3943< A HREF ="http://www.lua.org/donations.html "> help to support</ A >
4044the Lua project.
41- < P >
4245
43- The reference manual is the official definition of the Lua language.
44- For a complete introduction to Lua programming, see the book
45- < A HREF ="http://www.lua.org/docs.html#books "> Programming in Lua</ A > .
4646< P >
47-
4847< A HREF ="manual.html "> start</ A >
4948·
5049< A HREF ="#contents "> contents</ A >
5150·
5251< A HREF ="#index "> index</ A >
5352·
54- < A HREF ="http://www.lua.org/manual/5.1/pt/ "> português</ A >
55- ·
56- < A HREF ="http://www.lua.org/manual/5.1/es/ "> español</ A >
53+ < A HREF ="http://www.lua.org/manual/ "> other versions</ A >
5754< HR >
5855< SMALL >
59- Copyright © 2006-2008 Lua.org, PUC-Rio.
56+ Copyright © 2006–2012 Lua.org, PUC-Rio.
6057Freely available under the terms of the
61- < a href ="http://www.lua.org/license.html#5 "> Lua license</ a > .
58+ < A HREF ="http://www.lua.org/license.html "> Lua license</ A > .
6259</ SMALL >
63- < P >
6460
6561< H2 > < A NAME ="contents "> Contents</ A > </ H2 >
6662< UL style ="padding: 0 ">
67- < LI > < A HREF ="manual.html "> 1 - Introduction</ A >
63+ < LI > < A HREF ="manual.html "> 1 – Introduction</ A >
6864< P >
69- < LI > < A HREF ="manual.html#2 "> 2 - The Language</ A >
65+ < LI > < A HREF ="manual.html#2 "> 2 – The Language</ A >
7066< UL >
71- < LI > < A HREF ="manual.html#2.1 "> 2.1 - Lexical Conventions</ A >
72- < LI > < A HREF ="manual.html#2.2 "> 2.2 - Values and Types</ A >
67+ < LI > < A HREF ="manual.html#2.1 "> 2.1 – Lexical Conventions</ A >
68+ < LI > < A HREF ="manual.html#2.2 "> 2.2 – Values and Types</ A >
7369< UL >
74- < LI > < A HREF ="manual.html#2.2.1 "> 2.2.1 - Coercion</ A >
70+ < LI > < A HREF ="manual.html#2.2.1 "> 2.2.1 – Coercion</ A >
7571</ UL >
76- < LI > < A HREF ="manual.html#2.3 "> 2.3 - Variables</ A >
77- < LI > < A HREF ="manual.html#2.4 "> 2.4 - Statements</ A >
72+ < LI > < A HREF ="manual.html#2.3 "> 2.3 – Variables</ A >
73+ < LI > < A HREF ="manual.html#2.4 "> 2.4 – Statements</ A >
7874< UL >
79- < LI > < A HREF ="manual.html#2.4.1 "> 2.4.1 - Chunks</ A >
80- < LI > < A HREF ="manual.html#2.4.2 "> 2.4.2 - Blocks</ A >
81- < LI > < A HREF ="manual.html#2.4.3 "> 2.4.3 - Assignment</ A >
82- < LI > < A HREF ="manual.html#2.4.4 "> 2.4.4 - Control Structures</ A >
83- < LI > < A HREF ="manual.html#2.4.5 "> 2.4.5 - For Statement</ A >
84- < LI > < A HREF ="manual.html#2.4.6 "> 2.4.6 - Function Calls as Statements</ A >
85- < LI > < A HREF ="manual.html#2.4.7 "> 2.4.7 - Local Declarations</ A >
75+ < LI > < A HREF ="manual.html#2.4.1 "> 2.4.1 – Chunks</ A >
76+ < LI > < A HREF ="manual.html#2.4.2 "> 2.4.2 – Blocks</ A >
77+ < LI > < A HREF ="manual.html#2.4.3 "> 2.4.3 – Assignment</ A >
78+ < LI > < A HREF ="manual.html#2.4.4 "> 2.4.4 – Control Structures</ A >
79+ < LI > < A HREF ="manual.html#2.4.5 "> 2.4.5 – For Statement</ A >
80+ < LI > < A HREF ="manual.html#2.4.6 "> 2.4.6 – Function Calls as Statements</ A >
81+ < LI > < A HREF ="manual.html#2.4.7 "> 2.4.7 – Local Declarations</ A >
8682</ UL >
87- < LI > < A HREF ="manual.html#2.5 "> 2.5 - Expressions</ A >
83+ < LI > < A HREF ="manual.html#2.5 "> 2.5 – Expressions</ A >
8884< UL >
89- < LI > < A HREF ="manual.html#2.5.1 "> 2.5.1 - Arithmetic Operators</ A >
90- < LI > < A HREF ="manual.html#2.5.2 "> 2.5.2 - Relational Operators</ A >
91- < LI > < A HREF ="manual.html#2.5.3 "> 2.5.3 - Logical Operators</ A >
92- < LI > < A HREF ="manual.html#2.5.4 "> 2.5.4 - Concatenation</ A >
93- < LI > < A HREF ="manual.html#2.5.5 "> 2.5.5 - The Length Operator</ A >
94- < LI > < A HREF ="manual.html#2.5.6 "> 2.5.6 - Precedence</ A >
95- < LI > < A HREF ="manual.html#2.5.7 "> 2.5.7 - Table Constructors</ A >
96- < LI > < A HREF ="manual.html#2.5.8 "> 2.5.8 - Function Calls</ A >
97- < LI > < A HREF ="manual.html#2.5.9 "> 2.5.9 - Function Definitions</ A >
85+ < LI > < A HREF ="manual.html#2.5.1 "> 2.5.1 – Arithmetic Operators</ A >
86+ < LI > < A HREF ="manual.html#2.5.2 "> 2.5.2 – Relational Operators</ A >
87+ < LI > < A HREF ="manual.html#2.5.3 "> 2.5.3 – Logical Operators</ A >
88+ < LI > < A HREF ="manual.html#2.5.4 "> 2.5.4 – Concatenation</ A >
89+ < LI > < A HREF ="manual.html#2.5.5 "> 2.5.5 – The Length Operator</ A >
90+ < LI > < A HREF ="manual.html#2.5.6 "> 2.5.6 – Precedence</ A >
91+ < LI > < A HREF ="manual.html#2.5.7 "> 2.5.7 – Table Constructors</ A >
92+ < LI > < A HREF ="manual.html#2.5.8 "> 2.5.8 – Function Calls</ A >
93+ < LI > < A HREF ="manual.html#2.5.9 "> 2.5.9 – Function Definitions</ A >
9894</ UL >
99- < LI > < A HREF ="manual.html#2.6 "> 2.6 - Visibility Rules</ A >
100- < LI > < A HREF ="manual.html#2.7 "> 2.7 - Error Handling</ A >
101- < LI > < A HREF ="manual.html#2.8 "> 2.8 - Metatables</ A >
102- < LI > < A HREF ="manual.html#2.9 "> 2.9 - Environments</ A >
103- < LI > < A HREF ="manual.html#2.10 "> 2.10 - Garbage Collection</ A >
95+ < LI > < A HREF ="manual.html#2.6 "> 2.6 – Visibility Rules</ A >
96+ < LI > < A HREF ="manual.html#2.7 "> 2.7 – Error Handling</ A >
97+ < LI > < A HREF ="manual.html#2.8 "> 2.8 – Metatables</ A >
98+ < LI > < A HREF ="manual.html#2.9 "> 2.9 – Environments</ A >
99+ < LI > < A HREF ="manual.html#2.10 "> 2.10 – Garbage Collection</ A >
104100< UL >
105- < LI > < A HREF ="manual.html#2.10.1 "> 2.10.1 - Garbage-Collection Metamethods</ A >
106- < LI > < A HREF ="manual.html#2.10.2 "> 2.10.2 - Weak Tables</ A >
101+ < LI > < A HREF ="manual.html#2.10.1 "> 2.10.1 – Garbage-Collection Metamethods</ A >
102+ < LI > < A HREF ="manual.html#2.10.2 "> 2.10.2 – Weak Tables</ A >
107103</ UL >
108- < LI > < A HREF ="manual.html#2.11 "> 2.11 - Coroutines</ A >
104+ < LI > < A HREF ="manual.html#2.11 "> 2.11 – Coroutines</ A >
109105</ UL >
110106< P >
111- < LI > < A HREF ="manual.html#3 "> 3 - The Application Program Interface</ A >
107+ < LI > < A HREF ="manual.html#3 "> 3 – The Application Program Interface</ A >
112108< UL >
113- < LI > < A HREF ="manual.html#3.1 "> 3.1 - The Stack</ A >
114- < LI > < A HREF ="manual.html#3.2 "> 3.2 - Stack Size</ A >
115- < LI > < A HREF ="manual.html#3.3 "> 3.3 - Pseudo-Indices</ A >
116- < LI > < A HREF ="manual.html#3.4 "> 3.4 - C Closures</ A >
117- < LI > < A HREF ="manual.html#3.5 "> 3.5 - Registry</ A >
118- < LI > < A HREF ="manual.html#3.6 "> 3.6 - Error Handling in C</ A >
119- < LI > < A HREF ="manual.html#3.7 "> 3.7 - Functions and Types</ A >
120- < LI > < A HREF ="manual.html#3.8 "> 3.8 - The Debug Interface</ A >
109+ < LI > < A HREF ="manual.html#3.1 "> 3.1 – The Stack</ A >
110+ < LI > < A HREF ="manual.html#3.2 "> 3.2 – Stack Size</ A >
111+ < LI > < A HREF ="manual.html#3.3 "> 3.3 – Pseudo-Indices</ A >
112+ < LI > < A HREF ="manual.html#3.4 "> 3.4 – C Closures</ A >
113+ < LI > < A HREF ="manual.html#3.5 "> 3.5 – Registry</ A >
114+ < LI > < A HREF ="manual.html#3.6 "> 3.6 – Error Handling in C</ A >
115+ < LI > < A HREF ="manual.html#3.7 "> 3.7 – Functions and Types</ A >
116+ < LI > < A HREF ="manual.html#3.8 "> 3.8 – The Debug Interface</ A >
121117</ UL >
122118< P >
123- < LI > < A HREF ="manual.html#4 "> 4 - The Auxiliary Library</ A >
119+ < LI > < A HREF ="manual.html#4 "> 4 – The Auxiliary Library</ A >
124120< UL >
125- < LI > < A HREF ="manual.html#4.1 "> 4.1 - Functions and Types</ A >
121+ < LI > < A HREF ="manual.html#4.1 "> 4.1 – Functions and Types</ A >
126122</ UL >
127123< P >
128- < LI > < A HREF ="manual.html#5 "> 5 - Standard Libraries</ A >
124+ < LI > < A HREF ="manual.html#5 "> 5 – Standard Libraries</ A >
129125< UL >
130- < LI > < A HREF ="manual.html#5.1 "> 5.1 - Basic Functions</ A >
131- < LI > < A HREF ="manual.html#5.2 "> 5.2 - Coroutine Manipulation</ A >
132- < LI > < A HREF ="manual.html#5.3 "> 5.3 - Modules</ A >
133- < LI > < A HREF ="manual.html#5.4 "> 5.4 - String Manipulation</ A >
126+ < LI > < A HREF ="manual.html#5.1 "> 5.1 – Basic Functions</ A >
127+ < LI > < A HREF ="manual.html#5.2 "> 5.2 – Coroutine Manipulation</ A >
128+ < LI > < A HREF ="manual.html#5.3 "> 5.3 – Modules</ A >
129+ < LI > < A HREF ="manual.html#5.4 "> 5.4 – String Manipulation</ A >
134130< UL >
135- < LI > < A HREF ="manual.html#5.4.1 "> 5.4.1 - Patterns</ A >
131+ < LI > < A HREF ="manual.html#5.4.1 "> 5.4.1 – Patterns</ A >
136132</ UL >
137- < LI > < A HREF ="manual.html#5.5 "> 5.5 - Table Manipulation</ A >
138- < LI > < A HREF ="manual.html#5.6 "> 5.6 - Mathematical Functions</ A >
139- < LI > < A HREF ="manual.html#5.7 "> 5.7 - Input and Output Facilities</ A >
140- < LI > < A HREF ="manual.html#5.8 "> 5.8 - Operating System Facilities</ A >
141- < LI > < A HREF ="manual.html#5.9 "> 5.9 - The Debug Library</ A >
133+ < LI > < A HREF ="manual.html#5.5 "> 5.5 – Table Manipulation</ A >
134+ < LI > < A HREF ="manual.html#5.6 "> 5.6 – Mathematical Functions</ A >
135+ < LI > < A HREF ="manual.html#5.7 "> 5.7 – Input and Output Facilities</ A >
136+ < LI > < A HREF ="manual.html#5.8 "> 5.8 – Operating System Facilities</ A >
137+ < LI > < A HREF ="manual.html#5.9 "> 5.9 – The Debug Library</ A >
142138</ UL >
143139< P >
144- < LI > < A HREF ="manual.html#6 "> 6 - Lua Stand-alone</ A >
140+ < LI > < A HREF ="manual.html#6 "> 6 – Lua Stand-alone</ A >
145141< P >
146- < LI > < A HREF ="manual.html#7 "> 7 - Incompatibilities with the Previous Version</ A >
142+ < LI > < A HREF ="manual.html#7 "> 7 – Incompatibilities with the Previous Version</ A >
147143< UL >
148- < LI > < A HREF ="manual.html#7.1 "> 7.1 - Changes in the Language</ A >
149- < LI > < A HREF ="manual.html#7.2 "> 7.2 - Changes in the Libraries</ A >
150- < LI > < A HREF ="manual.html#7.3 "> 7.3 - Changes in the API</ A >
144+ < LI > < A HREF ="manual.html#7.1 "> 7.1 – Changes in the Language</ A >
145+ < LI > < A HREF ="manual.html#7.2 "> 7.2 – Changes in the Libraries</ A >
146+ < LI > < A HREF ="manual.html#7.3 "> 7.3 – Changes in the API</ A >
151147</ UL >
152148< P >
153- < LI > < A HREF ="manual.html#8 "> 8 - The Complete Syntax of Lua</ A >
149+ < LI > < A HREF ="manual.html#8 "> 8 – The Complete Syntax of Lua</ A >
154150</ UL >
155151
156152< H2 > < A NAME ="index "> Index</ A > </ H2 >
@@ -160,6 +156,8 @@ <H2><A NAME="index">Index</A></H2>
160156< H3 > < A NAME ="functions "> Lua functions</ A > </ H3 >
161157< A HREF ="manual.html#pdf-_G "> _G</ A > < BR >
162158< A HREF ="manual.html#pdf-_VERSION "> _VERSION</ A > < BR >
159+ < P >
160+
163161< A HREF ="manual.html#pdf-assert "> assert</ A > < BR >
164162< A HREF ="manual.html#pdf-collectgarbage "> collectgarbage</ A > < BR >
165163< A HREF ="manual.html#pdf-dofile "> dofile</ A > < BR >
@@ -487,12 +485,12 @@ <H3>auxiliary library</H3>
487485< P >
488486
489487< HR >
490- < SMALL >
488+ < SMALL CLASS =" footer " >
491489Last update:
492- Sat Jan 19 13:24:29 BRST 2008
490+ Mon Feb 13 18:53:32 BRST 2012
493491</ SMALL >
494492<!--
495- Last change: revised for Lua 5.1.3
493+ Last change: revised for Lua 5.1.5
496494-->
497495
498496</ BODY >
0 commit comments