lua-users home
lua-l archive

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


On Wed, Apr 23, 2014 at 2:26 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> IMHO it is a bug that tbl[inf] and tbl[-inf] does not work. Too late
> for Lua 5.1,
> but this could still make the final Lua 5.2 release.

Just tested with 5.2.2:

> inf = 1/0
> = inf
1.#INF
> t[inf] = 10
> = t[inf]
10

I'm trying to understand what t[inf] is meant to do with the proposal
"behaves like the end of a sequence as index".  Like t[#t]?