|
No, this is not a bug. The length operator #, when used on tables, is only defined for sequences. Above table is not a sequence. See http://www.lua.org/manual/5.3/manual.html#3.4.7 for details. btw, "Programming Lua, Fourth Edition" is out, you might consider an "update"... Especially since the new edition contains a nice explanation in chapter 5.3 which the length operator on tables with nil's is such a nice source of confusion... |