[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 Length Operator and tables (bug?)
- From: Coda Highland <chighland@...>
- Date: Tue, 17 Apr 2012 11:18:05 -0500
On Tue, Apr 17, 2012 at 11:09 AM, Robert Virding
<robert.virding@erlang-solutions.com> wrote:
> I think the main problem is that you cannot "see" from the value of #t is a proper sequence or not, or if there is a proper subsequence. #t always returns a "valid looking" result even if the table is not valid table and the value is basically meaningless. To me that is the problem.
function table.issequence(t)
for i = 1, #t do
if t[i] == nil then return false end
end
return true
end