[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (work1) now available
- From: Coda Highland <chighland@...>
- Date: Wed, 14 Mar 2018 07:04:44 -0500
On Wed, Mar 14, 2018 at 1:04 AM, Russell Haley <russ.haley@gmail.com> wrote:
>> u = table.move(t,1,#t,1,{})
>> for i,v in pairs(u) do print(i,v) end
> 1 one
> 2 two
> 3 four
> 4 nil
> 5 five
>> #t
> 5
>> t[4] = undef
>> for i,v in pairs(t) do print(i,v) end
> 1 one
> 2 two
> 3 four
> 5 five
>> #t
> 3 --<<<<<< I Expected 4 here?
>>
This is expected. You have a table with a hole in it -- and you
explicitly constructed it that way. The length of the sequence part of
t is, in fact, 3.
/s/ Adam
- References:
- [ANN] Lua 5.4.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.4.0 (work1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.4.0 (work1) now available, Xavier Wang
- Re: [ANN] Lua 5.4.0 (work1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.4.0 (work1) now available, Tomás Guisasola
- Re: [ANN] Lua 5.4.0 (work1) now available, Coda Highland
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley
- Re: [ANN] Lua 5.4.0 (work1) now available, Coda Highland
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley
- Re: [ANN] Lua 5.4.0 (work1) now available, Russell Haley