lua-users home
lua-l archive

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



On Oct 2, 2013, at 2:19 PM, Tim Hill <drtimhill@gmail.com> wrote:

if type(new_key) == "number") and bSequence then
bSequence = (new_key == #t +1)
end


I was of course simplifying here for clarity. You would also need to check for creating a hole (assigning nil to any numeric key < #t+1) and reset bSequence in this case as well, and skip changes to existing keys within range (except the nil case as noted).

--Tim