lua-users home
lua-l archive

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



RLake@oxfam.org.pe wrote:
It has been changed in version 5, exactly as you describe.
However, the old behaviour is still supported as well.

Not quite exactly, but very close. Note that 'n' takes precedence over setn.

$ lua
Lua 5.0  Copyright (C) 1994-2003 Tecgraf, PUC-Rio
> t = { 11,22,33 }
> table.setn(t, 3)
> = table.getn(t)
3
> t.n = 2
> = table.getn(t)
2
>