lua-users home
lua-l archive

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

On Fri, Jun 26, 2009 at 7:08 AM, Vaughan McAlley<> wrote:
> What might be nice is an optional argument to unpack that replaces #
> if it is present. Also table.concat and perhaps other functions that
> rely on # rather than stopping at the first nil. So this sort of thing
> would be possible:

table.concat (table [, sep [, i [, j]]])

unpack (list [, i [, j]])

Both of these functions already have optional extra arguments, i and
j, which specify the range to operate over. By default they are 1 and
#table, but you can pass other values.