lua-users home
lua-l archive

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



On Jun 29, 2008, at 12:54 AM, Leo Razoumov wrote:

The last example also has 2 holes (t[2],t[4]) but it works.

For a given definition of 'work'... take a closer look at what it does...

Go figure:-)


ipairs "will iterate over the pairs (1,t[1]), (2,t[2]), ···, up to the first integer key absent from the table."

http://www.lua.org/manual/5.1/manual.html#pdf-ipairs

Finally...

"Don't claim that you have found a bug"
-- Eric Steven Raymond, "How To Ask Questions The Smart Way", 2001
http://www.catb.org/~esr/faqs/smart-questions.html#id306810

--
PA.
http://alt.textdrive.com/nanoki/