[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Unexpected table.remove behaviour.
- From: lostgallifreyan <lostgallifreyan@...>
- Date: Wed, 24 Jun 2009 19:20:06 +0100
Ok, there's more... I see that this is a busy time, a new Lua being discussed and all, but I think the Great and the Good of Lua's development might really need to see this one:
--Try with one or other of above lines active
for N=1,24 do -- Could have used "for N in ipairs(X) do" here, same business results...
if X[N]%2==1 then Y[N]=X[N] end
print(#X,#Y,Y,Y) --Note the value of #Y!
I think the weird table.remove behaviour is rooted in whatever is causing this to happen, but I don't know C so I'm not going to try guessing why.