lua-users home
lua-l archive

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


> I want `a.b.c.d.e`. I'm going to test for nil, and I don't care
> at what level the missing index is.
> 
> [...]

PiL 4 suggests the following method:

  E = {}      -- (somewhere in your code)

  ((((a or E).b or E).c or E).d or E).e

-- Roberto