diff options
Diffstat (limited to 'manual/manual.of')
| -rw-r--r-- | manual/manual.of | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/manual/manual.of b/manual/manual.of index 9b6976ca..96203d7f 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
| @@ -2402,7 +2402,7 @@ g(3, 4, 5, 8) a=3, b=4, ... -> 5 8 | |||
| 2402 | g(5, r()) a=5, b=1, ... -> 2 3 | 2402 | g(5, r()) a=5, b=1, ... -> 2 3 |
| 2403 | } | 2403 | } |
| 2404 | 2404 | ||
| 2405 | The presence of a varag table in a variadic function is indicated | 2405 | The presence of a vararg table in a variadic function is indicated |
| 2406 | by a name after the three dots. | 2406 | by a name after the three dots. |
| 2407 | When present, | 2407 | When present, |
| 2408 | a vararg table behaves like a read-only local variable | 2408 | a vararg table behaves like a read-only local variable |
| @@ -2418,8 +2418,9 @@ local <const> name = table.pack(...) | |||
| 2418 | } | 2418 | } |
| 2419 | 2419 | ||
| 2420 | As an optimization, | 2420 | As an optimization, |
| 2421 | if the vararg table is used only as a base in indexing expressions | 2421 | if the vararg table is used only as the base table |
| 2422 | (the @T{t} in @T{t[exp]} or @T{t.id}) and it is not an upvalue, | 2422 | in the syntactic constructions @T{t[exp]} or @T{t.id}) |
| 2423 | and it is not an upvalue, | ||
| 2423 | the code does not create an actual table and instead translates | 2424 | the code does not create an actual table and instead translates |
| 2424 | the indexing expressions into accesses to the internal vararg data. | 2425 | the indexing expressions into accesses to the internal vararg data. |
| 2425 | 2426 | ||
| @@ -2427,8 +2428,7 @@ the indexing expressions into accesses to the internal vararg data. | |||
| 2427 | 2428 | ||
| 2428 | } | 2429 | } |
| 2429 | 2430 | ||
| 2430 | @sect3{multires| @title{Lists of expressions, multiple results, | 2431 | @sect3{multires| @title{Lists of Expressions, Multiple Results, and Adjustment} |
| 2431 | and adjustment} | ||
| 2432 | 2432 | ||
| 2433 | Both function calls and vararg expressions can result in multiple values. | 2433 | Both function calls and vararg expressions can result in multiple values. |
| 2434 | These expressions are called @def{multires expressions}. | 2434 | These expressions are called @def{multires expressions}. |
| @@ -2686,7 +2686,7 @@ which behaves like a nil value. | |||
| 2686 | 2686 | ||
| 2687 | } | 2687 | } |
| 2688 | 2688 | ||
| 2689 | @sect3{constchar|@title{Pointers to strings} | 2689 | @sect3{constchar|@title{Pointers to Strings} |
| 2690 | 2690 | ||
| 2691 | Several functions in the API return pointers (@T{const char*}) | 2691 | Several functions in the API return pointers (@T{const char*}) |
| 2692 | to Lua strings in the stack. | 2692 | to Lua strings in the stack. |
| @@ -4126,6 +4126,8 @@ Lua still has to allocate a header for the string. | |||
| 4126 | In case of a memory-allocation error, | 4126 | In case of a memory-allocation error, |
| 4127 | Lua will call @id{falloc} before raising the error. | 4127 | Lua will call @id{falloc} before raising the error. |
| 4128 | 4128 | ||
| 4129 | The function returns a pointer to the string (that is, @id{s}). | ||
| 4130 | |||
| 4129 | } | 4131 | } |
| 4130 | 4132 | ||
| 4131 | 4133 | ||
| @@ -8413,7 +8415,7 @@ a value greater than any other numeric value. | |||
| 8413 | 8415 | ||
| 8414 | } | 8416 | } |
| 8415 | 8417 | ||
| 8416 | @LibEntry{math.ldexp(m, e)| | 8418 | @LibEntry{math.ldexp (m, e)| |
| 8417 | 8419 | ||
| 8418 | Returns @M{m2@sp{e}}, where @id{e} is an integer. | 8420 | Returns @M{m2@sp{e}}, where @id{e} is an integer. |
| 8419 | 8421 | ||
