[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 'table' as fallback for tables
- From: Gavin Wraith <gavin@...>
- Date: Thu, 30 Jun 2016 14:41:40 +0100
In message <20160630132301.GB21516@inf.puc-rio.br>
Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> ? How should constructors set length? What are the lengths of {}, {1, 2} and {1, 2, [3]=3} ?
>
>0, 2, and 2.
A typo, I presume. Just testing with
*lua
Lua 5.3.2 Copyright (C) 1994-2015 Lua.org, PUC-Rio
RiscLua 6.3
> x = { 1,2,[3]=3}
> print (#x)
3
> print (#{1,2,[4]="a"})
2
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/
- References:
- Re: 'table' as fallback for tables, Jay
- Re: 'table' as fallback for tables, Tim Hill
- Re: 'table' as fallback for tables, Philipp Janda
- Re: 'table' as fallback for tables, Tim Hill
- Re: 'table' as fallback for tables, Adrián Pérez de Castro
- Re: 'table' as fallback for tables, Andrew Starks
- Re: 'table' as fallback for tables, steve donovan
- Re: 'table' as fallback for tables, Coda Highland
- Re: 'table' as fallback for tables, Roberto Ierusalimschy
- Re: 'table' as fallback for tables, Tim Hill
- Re: 'table' as fallback for tables, Roberto Ierusalimschy