lua-users home
lua-l archive

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


On Mon, May 04, 2009 at 11:05:14AM -0400, V S P wrote:
> what's a way to anticipate the last iteration
> in loop over a table
> for colnm, coltype in pairs(tb_columns) do
unroll the magic for statement

and use next(tb_columns) directly

However, if you want something be done at the end of each
but the last iteration (like printing a ',') you
might as well do it at the start of each but the first one.