lua-users home
lua-l archive

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


>Be aware that 'lua_next' works fine for tables which contain only associations, but causes problems if your tables have indexed entries.

lua_next works fine for all tables. You just have to be aware that calling
lua_tostring on an index messes thing up for lua_next if the index is numerical.
This is an unfortunate side-effect of lua_tostring, which unfortunately shows
up when you're trying to learn how lua_next works and decide to print the
value of indices with lua_tostring.
--lhf