aboutsummaryrefslogtreecommitdiff
path: root/manual/manual.of
diff options
context:
space:
mode:
Diffstat (limited to 'manual/manual.of')
-rw-r--r--manual/manual.of16
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
2402g(5, r()) a=5, b=1, ... -> 2 3 2402g(5, r()) a=5, b=1, ... -> 2 3
2403} 2403}
2404 2404
2405The presence of a varag table in a variadic function is indicated 2405The presence of a vararg table in a variadic function is indicated
2406by a name after the three dots. 2406by a name after the three dots.
2407When present, 2407When present,
2408a vararg table behaves like a read-only local variable 2408a vararg table behaves like a read-only local variable
@@ -2418,8 +2418,9 @@ local <const> name = table.pack(...)
2418} 2418}
2419 2419
2420As an optimization, 2420As an optimization,
2421if the vararg table is used only as a base in indexing expressions 2421if 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, 2422in the syntactic constructions @T{t[exp]} or @T{t.id})
2423and it is not an upvalue,
2423the code does not create an actual table and instead translates 2424the code does not create an actual table and instead translates
2424the indexing expressions into accesses to the internal vararg data. 2425the 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}
2431and adjustment}
2432 2432
2433Both function calls and vararg expressions can result in multiple values. 2433Both function calls and vararg expressions can result in multiple values.
2434These expressions are called @def{multires expressions}. 2434These 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
2691Several functions in the API return pointers (@T{const char*}) 2691Several functions in the API return pointers (@T{const char*})
2692to Lua strings in the stack. 2692to Lua strings in the stack.
@@ -4126,6 +4126,8 @@ Lua still has to allocate a header for the string.
4126In case of a memory-allocation error, 4126In case of a memory-allocation error,
4127Lua will call @id{falloc} before raising the error. 4127Lua will call @id{falloc} before raising the error.
4128 4128
4129The 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
8418Returns @M{m2@sp{e}}, where @id{e} is an integer. 8420Returns @M{m2@sp{e}}, where @id{e} is an integer.
8419 8421