Mercurial Hosting > luan
comparison docs/manual.html @ 240:bcc3911285a2
add manual css files
git-svn-id: https://luan-java.googlecode.com/svn/trunk@241 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 06 Oct 2014 22:27:24 +0000 |
parents | aa7bc9c1df22 |
children | 852840d64a7f |
comparison
equal
deleted
inserted
replaced
239:aa7bc9c1df22 | 240:bcc3911285a2 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> | 2 <html> |
3 | 3 |
4 <head> | 4 <head> |
5 <title>Lua 5.2 Reference Manual</title> | 5 <title>Lua 5.2 Reference Manual</title> |
6 <link rel="stylesheet" type="text/css" href="http://www.lua.org/lua.css"> | 6 <link rel="stylesheet" type="text/css" href="lua.css"> |
7 <link rel="stylesheet" type="text/css" href="http://www.lua.org/manual/manual.css"> | 7 <link rel="stylesheet" type="text/css" href="manual.css"> |
8 <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"> | 8 <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1"> |
9 </head> | 9 </head> |
10 | 10 |
11 <body> | 11 <body> |
12 | 12 |
13 <hr> | 13 <hr> |
14 <h1> | 14 <h1> |
15 <a href="../../home.html"><img src="../../images/logo.gif" alt="" border="0"></a> | 15 Luan Reference Manual |
16 Lua 5.2 Reference Manual | |
17 </h1> | 16 </h1> |
18 | 17 |
19 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes | 18 <P> |
19 The reference manual is the official definition of the Luan language. | |
20 | |
20 <p> | 21 <p> |
21 <small> | 22 <small> |
22 Copyright © 2011–2013 Lua.org, PUC-Rio. | 23 Original Copyright © 2011–2013 Lua.org, PUC-Rio. |
23 Freely available under the terms of the | 24 Freely available under the terms of the |
24 <a href="../../license.html">Lua license</a>. | 25 <a href="http://www.lua.org/license.html">Lua license</a>. |
26 Modified for Luan in 2014. | |
25 </small> | 27 </small> |
26 <hr> | 28 <hr> |
27 <p> | 29 <p> |
28 | 30 |
29 <a href="contents.html#contents">contents</A> | |
30 · | |
31 <a href="contents.html#index">index</A> | |
32 · | |
33 <a href="../">other versions</A> | |
34 | 31 |
35 <!-- ====================================================================== --> | 32 <!-- ====================================================================== --> |
36 <p> | 33 <p> |
37 | 34 |
38 <!-- $Id: manual.of,v 1.103 2013/03/14 18:51:56 roberto Exp $ --> | 35 <!-- $Id: manual.of,v 1.103 2013/03/14 18:51:56 roberto Exp $ --> |
39 | 36 |
40 | 37 |
41 <H2><A NAME="contents">Contents</A></H2> | 38 <H2><A NAME="contents">Contents</A></H2> |
42 <UL style="padding: 0"> | 39 <UL style="padding: 0"> |
43 <LI><A HREF="manual.html#1">1 – Introduction</A> | 40 <LI><A HREF="#1">1 – Introduction</A> |
44 <P> | 41 <P> |
45 <LI><A HREF="manual.html#2">2 – Basic Concepts</A> | 42 <LI><A HREF="#2">2 – Basic Concepts</A> |
46 <UL> | 43 <UL> |
47 <LI><A HREF="manual.html#2.1">2.1 – Values and Types</A> | 44 <LI><A HREF="#2.1">2.1 – Values and Types</A> |
48 <LI><A HREF="manual.html#2.2">2.2 – Environments and the Global Environment</A> | 45 <LI><A HREF="#2.2">2.2 – Environments and the Global Environment</A> |
49 <LI><A HREF="manual.html#2.3">2.3 – Error Handling</A> | 46 <LI><A HREF="#2.3">2.3 – Error Handling</A> |
50 <LI><A HREF="manual.html#2.4">2.4 – Metatables and Metamethods</A> | 47 <LI><A HREF="#2.4">2.4 – Metatables and Metamethods</A> |
51 <LI><A HREF="manual.html#2.5">2.5 – Garbage Collection</A> | 48 <LI><A HREF="#2.5">2.5 – Garbage Collection</A> |
52 <UL> | 49 <UL> |
53 <LI><A HREF="manual.html#2.5.1">2.5.1 – Garbage-Collection Metamethods</A> | 50 <LI><A HREF="#2.5.1">2.5.1 – Garbage-Collection Metamethods</A> |
54 <LI><A HREF="manual.html#2.5.2">2.5.2 – Weak Tables</A> | 51 <LI><A HREF="#2.5.2">2.5.2 – Weak Tables</A> |
55 </UL> | 52 </UL> |
56 <LI><A HREF="manual.html#2.6">2.6 – Coroutines</A> | 53 <LI><A HREF="#2.6">2.6 – Coroutines</A> |
57 </UL> | 54 </UL> |
58 <P> | 55 <P> |
59 <LI><A HREF="manual.html#3">3 – The Language</A> | 56 <LI><A HREF="#3">3 – The Language</A> |
60 <UL> | 57 <UL> |
61 <LI><A HREF="manual.html#3.1">3.1 – Lexical Conventions</A> | 58 <LI><A HREF="#3.1">3.1 – Lexical Conventions</A> |
62 <LI><A HREF="manual.html#3.2">3.2 – Variables</A> | 59 <LI><A HREF="#3.2">3.2 – Variables</A> |
63 <LI><A HREF="manual.html#3.3">3.3 – Statements</A> | 60 <LI><A HREF="#3.3">3.3 – Statements</A> |
64 <UL> | 61 <UL> |
65 <LI><A HREF="manual.html#3.3.1">3.3.1 – Blocks</A> | 62 <LI><A HREF="#3.3.1">3.3.1 – Blocks</A> |
66 <LI><A HREF="manual.html#3.3.2">3.3.2 – Chunks</A> | 63 <LI><A HREF="#3.3.2">3.3.2 – Chunks</A> |
67 <LI><A HREF="manual.html#3.3.3">3.3.3 – Assignment</A> | 64 <LI><A HREF="#3.3.3">3.3.3 – Assignment</A> |
68 <LI><A HREF="manual.html#3.3.4">3.3.4 – Control Structures</A> | 65 <LI><A HREF="#3.3.4">3.3.4 – Control Structures</A> |
69 <LI><A HREF="manual.html#3.3.5">3.3.5 – For Statement</A> | 66 <LI><A HREF="#3.3.5">3.3.5 – For Statement</A> |
70 <LI><A HREF="manual.html#3.3.6">3.3.6 – Function Calls as Statements</A> | 67 <LI><A HREF="#3.3.6">3.3.6 – Function Calls as Statements</A> |
71 <LI><A HREF="manual.html#3.3.7">3.3.7 – Local Declarations</A> | 68 <LI><A HREF="#3.3.7">3.3.7 – Local Declarations</A> |
72 </UL> | 69 </UL> |
73 <LI><A HREF="manual.html#3.4">3.4 – Expressions</A> | 70 <LI><A HREF="#3.4">3.4 – Expressions</A> |
74 <UL> | 71 <UL> |
75 <LI><A HREF="manual.html#3.4.1">3.4.1 – Arithmetic Operators</A> | 72 <LI><A HREF="#3.4.1">3.4.1 – Arithmetic Operators</A> |
76 <LI><A HREF="manual.html#3.4.2">3.4.2 – Coercion</A> | 73 <LI><A HREF="#3.4.2">3.4.2 – Coercion</A> |
77 <LI><A HREF="manual.html#3.4.3">3.4.3 – Relational Operators</A> | 74 <LI><A HREF="#3.4.3">3.4.3 – Relational Operators</A> |
78 <LI><A HREF="manual.html#3.4.4">3.4.4 – Logical Operators</A> | 75 <LI><A HREF="#3.4.4">3.4.4 – Logical Operators</A> |
79 <LI><A HREF="manual.html#3.4.5">3.4.5 – Concatenation</A> | 76 <LI><A HREF="#3.4.5">3.4.5 – Concatenation</A> |
80 <LI><A HREF="manual.html#3.4.6">3.4.6 – The Length Operator</A> | 77 <LI><A HREF="#3.4.6">3.4.6 – The Length Operator</A> |
81 <LI><A HREF="manual.html#3.4.7">3.4.7 – Precedence</A> | 78 <LI><A HREF="#3.4.7">3.4.7 – Precedence</A> |
82 <LI><A HREF="manual.html#3.4.8">3.4.8 – Table Constructors</A> | 79 <LI><A HREF="#3.4.8">3.4.8 – Table Constructors</A> |
83 <LI><A HREF="manual.html#3.4.9">3.4.9 – Function Calls</A> | 80 <LI><A HREF="#3.4.9">3.4.9 – Function Calls</A> |
84 <LI><A HREF="manual.html#3.4.10">3.4.10 – Function Definitions</A> | 81 <LI><A HREF="#3.4.10">3.4.10 – Function Definitions</A> |
85 </UL> | 82 </UL> |
86 <LI><A HREF="manual.html#3.5">3.5 – Visibility Rules</A> | 83 <LI><A HREF="#3.5">3.5 – Visibility Rules</A> |
87 </UL> | 84 </UL> |
88 <P> | 85 <P> |
89 <LI><A HREF="manual.html#4">4 – The Application Program Interface</A> | 86 <LI><A HREF="#4">4 – The Application Program Interface</A> |
90 <UL> | 87 <UL> |
91 <LI><A HREF="manual.html#4.1">4.1 – The Stack</A> | 88 <LI><A HREF="#4.1">4.1 – The Stack</A> |
92 <LI><A HREF="manual.html#4.2">4.2 – Stack Size</A> | 89 <LI><A HREF="#4.2">4.2 – Stack Size</A> |
93 <LI><A HREF="manual.html#4.3">4.3 – Valid and Acceptable Indices</A> | 90 <LI><A HREF="#4.3">4.3 – Valid and Acceptable Indices</A> |
94 <LI><A HREF="manual.html#4.4">4.4 – C Closures</A> | 91 <LI><A HREF="#4.4">4.4 – C Closures</A> |
95 <LI><A HREF="manual.html#4.5">4.5 – Registry</A> | 92 <LI><A HREF="#4.5">4.5 – Registry</A> |
96 <LI><A HREF="manual.html#4.6">4.6 – Error Handling in C</A> | 93 <LI><A HREF="#4.6">4.6 – Error Handling in C</A> |
97 <LI><A HREF="manual.html#4.7">4.7 – Handling Yields in C</A> | 94 <LI><A HREF="#4.7">4.7 – Handling Yields in C</A> |
98 <LI><A HREF="manual.html#4.8">4.8 – Functions and Types</A> | 95 <LI><A HREF="#4.8">4.8 – Functions and Types</A> |
99 <LI><A HREF="manual.html#4.9">4.9 – The Debug Interface</A> | 96 <LI><A HREF="#4.9">4.9 – The Debug Interface</A> |
100 </UL> | 97 </UL> |
101 <P> | 98 <P> |
102 <LI><A HREF="manual.html#5">5 – The Auxiliary Library</A> | 99 <LI><A HREF="#5">5 – The Auxiliary Library</A> |
103 <UL> | 100 <UL> |
104 <LI><A HREF="manual.html#5.1">5.1 – Functions and Types</A> | 101 <LI><A HREF="#5.1">5.1 – Functions and Types</A> |
105 </UL> | 102 </UL> |
106 <P> | 103 <P> |
107 <LI><A HREF="manual.html#6">6 – Standard Libraries</A> | 104 <LI><A HREF="#6">6 – Standard Libraries</A> |
108 <UL> | 105 <UL> |
109 <LI><A HREF="manual.html#6.1">6.1 – Basic Functions</A> | 106 <LI><A HREF="#6.1">6.1 – Basic Functions</A> |
110 <LI><A HREF="manual.html#6.2">6.2 – Coroutine Manipulation</A> | 107 <LI><A HREF="#6.2">6.2 – Coroutine Manipulation</A> |
111 <LI><A HREF="manual.html#6.3">6.3 – Modules</A> | 108 <LI><A HREF="#6.3">6.3 – Modules</A> |
112 <LI><A HREF="manual.html#6.4">6.4 – String Manipulation</A> | 109 <LI><A HREF="#6.4">6.4 – String Manipulation</A> |
113 <UL> | 110 <UL> |
114 <LI><A HREF="manual.html#6.4.1">6.4.1 – Patterns</A> | 111 <LI><A HREF="#6.4.1">6.4.1 – Patterns</A> |
115 </UL> | 112 </UL> |
116 <LI><A HREF="manual.html#6.5">6.5 – Table Manipulation</A> | 113 <LI><A HREF="#6.5">6.5 – Table Manipulation</A> |
117 <LI><A HREF="manual.html#6.6">6.6 – Mathematical Functions</A> | 114 <LI><A HREF="#6.6">6.6 – Mathematical Functions</A> |
118 <LI><A HREF="manual.html#6.7">6.7 – Bitwise Operations</A> | 115 <LI><A HREF="#6.7">6.7 – Bitwise Operations</A> |
119 <LI><A HREF="manual.html#6.8">6.8 – Input and Output Facilities</A> | 116 <LI><A HREF="#6.8">6.8 – Input and Output Facilities</A> |
120 <LI><A HREF="manual.html#6.9">6.9 – Operating System Facilities</A> | 117 <LI><A HREF="#6.9">6.9 – Operating System Facilities</A> |
121 <LI><A HREF="manual.html#6.10">6.10 – The Debug Library</A> | 118 <LI><A HREF="#6.10">6.10 – The Debug Library</A> |
122 </UL> | 119 </UL> |
123 <P> | 120 <P> |
124 <LI><A HREF="manual.html#7">7 – Lua Standalone</A> | 121 <LI><A HREF="#7">7 – Lua Standalone</A> |
125 <P> | 122 <P> |
126 <LI><A HREF="manual.html#8">8 – Incompatibilities with the Previous Version</A> | 123 <LI><A HREF="#8">8 – Incompatibilities with the Previous Version</A> |
127 <UL> | 124 <UL> |
128 <LI><A HREF="manual.html#8.1">8.1 – Changes in the Language</A> | 125 <LI><A HREF="#8.1">8.1 – Changes in the Language</A> |
129 <LI><A HREF="manual.html#8.2">8.2 – Changes in the Libraries</A> | 126 <LI><A HREF="#8.2">8.2 – Changes in the Libraries</A> |
130 <LI><A HREF="manual.html#8.3">8.3 – Changes in the API</A> | 127 <LI><A HREF="#8.3">8.3 – Changes in the API</A> |
131 </UL> | 128 </UL> |
132 <P> | 129 <P> |
133 <LI><A HREF="manual.html#9">9 – The Complete Syntax of Lua</A> | 130 <LI><A HREF="#9">9 – The Complete Syntax of Lua</A> |
134 </UL> | 131 </UL> |
135 | 132 |
136 | 133 |
137 <h1>1 – <a name="1">Introduction</a></h1> | 134 <h1>1 – <a name="1">Introduction</a></h1> |
138 | 135 |
176 this document is dry in places. | 173 this document is dry in places. |
177 For a discussion of the decisions behind the design of Lua, | 174 For a discussion of the decisions behind the design of Lua, |
178 see the technical papers available at Lua's web site. | 175 see the technical papers available at Lua's web site. |
179 For a detailed introduction to programming in Lua, | 176 For a detailed introduction to programming in Lua, |
180 see Roberto's book, <em>Programming in Lua</em>. | 177 see Roberto's book, <em>Programming in Lua</em>. |
181 | |
182 | 178 |
183 | 179 |
184 <h1>2 – <a name="2">Basic Concepts</a></h1> | 180 <h1>2 – <a name="2">Basic Concepts</a></h1> |
185 | 181 |
186 <p> | 182 <p> |