lua-users home
lua-l archive

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


From: "Gordon A. Acocella" <gaa@monmouth.com>
> My preference would be that doing a direct table assignment also updates
> the internal "n" value.  Of course, that would slow Lua down, which is
> an issue for many.

It wouldn't be too much slower.  In C you'd need this on every numeric
indexed write into a table: (pseudocode)

if(index == table.n + 1)
  ++table.n;