diff -r lua-5.0/doc/manual.html lua-5.0.1/doc/manual.html 5c5 <
The Lua distribuition includes a stand-alone embedding program, --- >
The Lua distribution includes a stand-alone embedding program,
90c88
< 2 - The Language
---
> 2 - The Language
108c106
<
2.1 - Lexical Conventions
---
>
2.1 - Lexical Conventions
125,126c123
< repeat return then true until
< while
---
> repeat return then true until while
214c211
<
2.2 - Values and Types
---
>
2.2 - Values and Types
295c292
<
2.2.1 - Coercion
---
>
2.2.1 - Coercion
306c303
<
2.3 - Variables
---
>
2.3 - Variables
375c372
<
2.4 - Statements
---
>
2.4 - Statements
383c380
<
2.4.1 - Chunks
---
>
2.4.1 - Chunks
408c405
<
2.4.2 - Blocks
426c423
<
2.4.3 - Assignment
---
>
2.4.3 - Assignment
461c458
< before it is assigned 4.
---
> before it is assigned 4.
488c485
<
2.4.4 - Control Structures
---
>
2.4.4 - Control Structures
519c516
< skiping to the next statement after the loop:
---
> skipping to the next statement after the loop:
539c536
<
2.4.5 - For Statement
---
>
2.4.5 - For Statement
626c623
<
2.4.6 - Function Calls as Statements
---
>
2.4.6 - Function Calls as Statements
635c632
<
2.4.7 - Local Declarations
---
>
2.4.7 - Local Declarations
652c649
<
2.5 - Expressions
---
>
2.5 - Expressions
683c680
<
2.5.1 - Arithmetic Operators
698c695
<
2.5.2 - Relational Operators
---
>
2.5.2 - Relational Operators
734c731
<
2.5.3 - Logical Operators
767c764
<
2.5.4 - Concatenation
---
>
2.5.4 - Concatenation
774c771
<
2.5.5 - Precedence
787c784
< As usual, you can use parentheses to change the precedences of an expression.
---
> You can use parentheses to change the precedences in an expression.
792c789
<
2.5.6 - Table Constructors
---
>
2.5.6 - Table Constructors
842c839
<
2.5.7 - Function Calls
---
>
2.5.7 - Function Calls
947c944
< return x, f(x) -- adicional results
---
> return x, f(x) -- additional results
952c949
<
2.5.8 - Function Definitions
---
>
2.5.8 - Function Definitions
1061c1058
<
2.6 - Visibility Rules
---
>
2.6 - Visibility Rules
1118c1115
<
2.7 - Error Handling
---
>
2.7 - Error Handling
1133c1130
<
2.8 - Metatables
---
>
2.8 - Metatables
1315c1312
< if type(op1) ~= type(op2) then -- diferent types?
---
> if type(op1) ~= type(op2) then -- different types?
1443c1440
<
2.9 - Garbage Collection
---
>
2.9 - Garbage Collection
1474c1471
<
2.9.1 - Garbage-Collection Metamethods
1506c1503
<
2.9.2 - Weak Tables
---
>
2.9.2 - Weak Tables
1524c1521
< If the __mode
field is a string containing the character `k
´,
---
> If the __mode
field is a string containing the character `k
´,
1534c1531
<
2.10 - Coroutines
---
>
2.10 - Coroutines
1552c1549
< passing as argument the thread returned by coroutine.create
,
---
> passing as its first argument the thread returned by coroutine.create
,
1633c1630
< 3 - The Application Program Interface
---
> 3 - The Application Program Interface
1648c1645
<
3.1 - States
---
>
3.1 - States
1684c1681
<
3.2 - The Stack and Indices
1694c1691
< and it is where the C function pushes its results (see 3.16)
---
> and it is where the C function pushes its results to be returned to the caller (see 3.16)
1739c1736
< it ensures that at least LUA_MINSTACK
positions are available.
---
> it ensures that at least LUA_MINSTACK
stack positions are available.
1763c1760
<
3.3 - Stack Manipulation
1816c1813
<
3.4 - Querying the Stack
1890c1887
<
3.5 - Getting Values from the Stack
---
>
3.5 - Getting Values from the Stack
1969c1966
<
3.6 - Pushing Values onto the Stack
---
>
3.6 - Pushing Values onto the Stack
1999,2000c1996
< const char *lua_pushvfstring (lua_State *L, const char *fmt,
< va_list argp);
---
> const char *lua_pushvfstring (lua_State *L, const char *fmt, va_list argp);
2028c2024
< If n
is 1, the result is that single string
---
> If n
is 1, the result is that single string
2034c2030
<
3.7 - Controlling Garbage Collection
---
>
3.7 - Controlling Garbage Collection
2047c2043
< int lua_getgccount (lua_State *L);
---
> int lua_getgccount (lua_State *L);
2067c2063
<
3.8 - Userdata
---
>
3.8 - Userdata
2112c2108
<
3.9 - Metatables
2133c2129
<
3.10 - Loading Lua Chunks
2160c2156
<
lua_load
uses an user-supplied reader function to read the chunk.
---
>
lua_load
uses a user-supplied reader function to read the chunk.
2162c2158
< it calls the reader,
---
> lua_load
calls the reader,
2182c2178
<
3.11 - Manipulating Tables
2263c2259
<
3.12 - Manipulating Environments
---
>
3.12 - Manipulating Environments
2295c2291
<
3.13 - Using Tables as Arrays
2312c2308
<
3.14 - Calling Functions
2367c2363
<
3.15 - Protected Calls
---
>
3.15 - Protected Calls
2414c2410
<
3.16 - Defining C Functions
---
>
3.16 - Defining C Functions
2482c2478
<
3.17 - Defining C Closures
---
>
3.17 - Defining C Closures
2517c2513
<
3.18 - Registry
---
>
3.18 - Registry
2535c2531
<
3.19 - Error Handling in C
2542,2543c2538,2539
< to set a recover point,
< and any error jumps to the most recent active recover point.
---
> to set a recover point;
> any error jumps to the most recent active recover point.
2546c2542
< Lua calls a panic function,
---
> Lua calls a panic function
2553,2554c2549,2550
< never returning (e.g. doing a long jump).
< Nevertheless, the corresponding Lua will not be consistent;
---
> never returning (e.g., by doing a long jump).
> Nevertheless, the corresponding Lua state will not be consistent;
2578c2574
< Any value returned by func
is dicarded.
---
> Any value returned by func
is discarded.
2590c2586
<
3.20 - Threads
2611,2616c2607,2609
<
You destroy threads with lua_closethread
:
<
< void lua_closethread (lua_State *L, lua_State *thread); << You cannot close the sole (or last) thread of a state. < Instead, you must close the state itself. --- >
There is no explicit function to close or to destroy a thread.
> Threads are subject to garbage collection,
> like any Lua object.
2622c2615
< int lua_yield (lua_State *L, int nresults);
---
> int lua_yield (lua_State *L, int nresults);
2632c2625
< lua_resume
returns 0 if there is no errors running the coroutine,
---
> lua_resume
returns 0 if there are no errors running the coroutine,
2660c2653
< 4 - The Debug Interface
---
> 4 - The Debug Interface
2669c2662
<
4.1 - Stack and Function Information
2681c2674
< When there is no errors, lua_getstack
returns 1;
---
> When there are no errors, lua_getstack
returns 1;
2789c2782
<
4.2 - Manipulating Local Variables and Upvalues
2866c2859
<
4.3 - Hooks
---
>
4.3 - Hooks
2942c2935
< 5 - Standard Libraries
---
> 5 - Standard Libraries
2985c2978
<
5.1 - Basic Functions
---
>
5.1 - Basic Functions
3018c3011
< Terminates the last protected function called,
---
> Terminates the last protected function called
3046c3039
<
if the environment has a "__fenv"
field,
---
>
If the environment has a "__fenv"
field,
3151c3144
< That means that any error inside f
is not propagated;
---
> That means that any error inside f
is not propagated;
3155c3148
< which is true if the call succeeds without errors.
---
> which is true if the call succeeds without errors.
3330c3323
<
5.2 - Coroutine Manipulation
3333c3326
< the basic library, and come inside the table .
---
> the basic library and come inside the table coroutine
.
3388c3381
<
5.3 - String Manipulation
3595c3588
< a character class is used to represent a set of characters.
---
> A character class is used to represent a set of characters.
3651c3644
< a pattern item may be
---
> A pattern item may be
3688c3681
< a pattern is a sequence of pattern items.
---
> A pattern is a sequence of pattern items.
3715c3708
<
5.4 - Table Manipulation
3824c3817
<
5.5 - Mathematical Functions
---
>
5.5 - Mathematical Functions
3879c3872
<
5.6 - Input and Output Facilities
---
>
5.6 - Input and Output Facilities
4072c4065
<
5.7 - Operating System Facilities
---
>
5.7 - Operating System Facilities
4098c4091
< wday
(weekday, Sunday is 1),
---
> wday
(weekday, Sunday is 1),
4187c4180
<
5.8 - The Reflexive Debug Interface
4323c4316
< 6 - Lua Stand-alone
---
> 6 - Lua Stand-alone
4462c4455
< Vincent Penquerc'h,
---
> Vincent Penquerc'h.
4583c4576
<
exp ::= nil false true | Number | Literal | function | prefixexp | tableconstructor | exp binop exp | unop exp --- >
exp ::= nil | false | true | Number | Literal | function | prefixexp | tableconstructor | exp binop exp | unop exp 4612c4605,4609 <