luaL_addsize

luaL_addsize[-?, +?, –] void luaL_addsize (luaL_Buffer *B, size_t n); Adds to the buffer B (see luaL_Buffer) a string of length n previously copied to the buffer area (see luaL_prepbuffer).

luaL_addlstring

luaL_addlstring[-?, +?, m] void luaL_addlstring (luaL_Buffer *B, const char *s, size_t l); Adds the string pointed to by s with length l to the buffer B (see luaL_Buffer). The string can contain embedded zeros.

luaL_addchar

luaL_addchar[-?, +?, m] void luaL_addchar (luaL_Buffer *B, char c); Adds the byte c to the buffer B (see luaL_Buffer).

Logical Operators

3.4.5 – Logical Operators The logical operators in Lua are and, or, and not. Like the control structures (see §3.3.4), all logical operators consider both false and nil as false and anything else as true. The negation operator not always returns false or true. The conjunction operator and returns its first argument if this value is false or nil; otherwise, and returns its second argument. The disjunction operator or returns its first argument if this value is different from nil and false; ot

Local Declarations

3.3.7 – Local Declarations Local variables can be declared anywhere inside a block. The declaration can include an initial assignment: stat ::= local namelist [‘=’ explist] If present, an initial assignment has the same semantics of a multiple assignment (see §3.3.3). Otherwise, all variables are initialized with nil. A chunk is also a block (see §3.3.2), and so local variables can be declared in a chunk outside any explicit block. The visibility rules for local variables are explained i

loadfile()

loadfile ([filename [, mode [, env]]]) Similar to load, but gets the chunk from file filename or from the standard input, if no file name is given.

load()

load (chunk [, chunkname [, mode [, env]]]) Loads a chunk. If chunk is a string, the chunk is this string. If chunk is a function, load calls it repeatedly to get the chunk pieces. Each call to chunk must return a string that concatenates with previous results. A return of an empty string, nil, or no value signals the end of the chunk. If there are no syntactic errors, returns the compiled chunk as a function; otherwise, returns nil plus the error message. If the resulting function has

ipairs()

ipairs (t) Returns three values (an iterator function, the table t, and 0) so that the construction for i,v in ipairs(t) do body end will iterate over the key–value pairs (1,t[1]), (2,t[2]), ..., up to the first nil value.

io.write()

io.write (···) Equivalent to io.output():write(···).

io.type()

io.type (obj) Checks whether obj is a valid file handle. Returns the string "file" if obj is an open file handle, "closed file" if obj is a closed file handle, or nil if obj is not a file handle.