[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 work3 manual
- From: Tony Finch <dot@...>
- Date: Wed, 19 May 2010 17:33:19 +0100
On Wed, 19 May 2010, Doug Currie wrote:
> On May 19, 2010, at 11:57 AM, Tony Finch wrote:
> >
> > nil_t = {}
> > setmetatable(t,{ __index = function () return nil_t end })
>
> Yikes! This seems to break Lua's definition of #
>
> Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> > nil_t = {}
> > t = {}
> > setmetatable(t,{ __index = function () return nil_t end })
> > return #t
> 0
> > return t[1]
> table: 0x100109640
> >
>
> -- Note: t[n+1] is not nil!
Er, yes, that's kind of the point.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/ 【ツ】
FAIR ISLE: SOUTHERLY 4 OR 5, BECOMING VARIABLE 3 OR 4. SLIGHT OR MODERATE.
OCCASIONAL RAIN OR DRIZZLE, FOG PATCHES. MODERATE OR GOOD, OCCASIONALLY VERY
POOR.
- References:
- Re: 5.2 work3 manual, Luiz Henrique de Figueiredo
- Re: 5.2 work3 manual, Gavin Wraith
- Re: 5.2 work3 manual, Gavin Wraith
- Re: 5.2 work3 manual, Duncan Cross
- Re: 5.2 work3 manual, Gavin Wraith
- Re: 5.2 work3 manual, Roberto Ierusalimschy
- Re: 5.2 work3 manual, Gavin Wraith
- Re: 5.2 work3 manual, Gavin Wraith
- Re: 5.2 work3 manual, Tony Finch
- Re: 5.2 work3 manual, Doug Currie