Re: Re: filter an array in place
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Re: filter an array in place
- From: "Gunnar Zötl" <gz@...>
- Date: 2011年1月14日 12:43:09 +0100 (MET)
>I find this interesting. Why are the results from table.remove different from table[index]=nil?I realise
probably because table.remove shifts down the following elements, thus changing index and position of the following elements, whereas setting some table element to nil does not mess with the association between indices and stored values.
See http://www.lua.org/manual/5.1/manual.html#pdf-table.remove
Gunnar