[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Deleting non-numerical index from table
- From: Norman Ramsey <nr@...>
- Date: Sun, 07 May 2006 21:23:46 -0400
> Did you really get "Why am I here?" as output??
Of course he did --- 'table' is a predefined global with lots of other
entries...
> --lhf
>
> > Once I have used a non-numerical table index, is it possible to delete
> > the index itself so that it is not returned from a call to next()?
> >
> > For example:
> >
> > table = {} table["index"] = true -- arbitrary value table["index"] =
> > nil -- delete the value, so shouldn't the index itself be
> > non-existent? i = next(table) -- programmer expects resulting i to be
> > nil if(table[i] ~= nil) then
> > print("Why am I here?")
> > end
> >