lua-users home
lua-l archive

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


On Tue, Dec 14, 2010 at 3:53 AM, Enrico Colombini <erix@erix.it> wrote:
> On 14/12/2010 9.39, Dirk Laurie wrote:
>>
>> But now table.remove(a,3) makes #a=999?  What sort of logic is that?
>
> The logic I read in Keith's proposal is:
>
> "by assigning a value to an integer index i higher than the current #t, I
> declare this to be array ranging from 1 to i. Inside this array, nil is a
> value like any other".
>
> The second rule is a logic consequence; it would be the only available way
> to shorten the array.
>
> In a broad sense, Mark's proposal is along the same line, even if it uses a
> completely different approach: both are ways to 'declare' an array so that
> it could contain nil values.
>
> --
>  Enrico

That's exactly it. Thank you for making such a concise summary of my
long and confusing post!

- Keith