lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Jan 10, 2011 at 5:06 AM, GrayFace <> wrote:
> table.insert(table, pos, ...)
> Inserts values '...' at position 'pos' in 'table', shifting up other
> elements to open space, if necessary.

The problem is that it's easy to make a multiple insertion by mistake.
It's common for functions to return multiple values (e.g. string.gsub)
and unless you're awake, you end up with extra nonsense in your list,
due to the arg expansion for the last argument to a function.

steve d.