[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Testing for a sequence (was Re: Lua 5.2 Length Operator and tables (bug?)
- From: Coda Highland <chighland@...>
- Date: Fri, 20 Apr 2012 07:38:47 -0500
> The problem with that is that other implementations can give a
> different result for the exact same table.
>
> LuaJIT 2.0.0-beta8 -- Copyright (C) 2005-2011 Mike Pall. http://luajit.org/
> JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc fuse
>> do
>>> local a = {10,20,nil,[3]=30,40}
>>> for k,v in pairs(a) do print(k,v) end
>>> end
> 1 10
> 2 20
> 3 30
> 4 40
>
> Liam
>
Weren't we JUST arguing about relying on implementation-defined behavior? ;)
/s/ Adam