lua-users home
lua-l archive

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


On Tue, Oct 18, 2011 at 5:56 AM, Victor Young <littlehaker@gmail.com> wrote:
> just in the order of how I construct the table, how could I do? Thanks!

Short answer: such tables do not have a stable iteration order (it's
the usual semi-random hash table thing)

To get the order you want, one way is to keep a sub-table of the keys
in order, and use that for iteration.

steve d.