[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Digest, Vol 93, Issue 6
- From: Shmuel Zeigerman <shmuz@...>
- Date: Thu, 13 Mar 2008 20:57:13 +0200
Alexandr Leykin wrote:
I want to get "is_key(table,key)->boolean" function, but not use full
select (using pairs or select operator)
Such a function isn't necessary. One can test the presence
of a key directly:
if table[key] ~= nil then ...
if rawget(table,key) ~= nil then ...
(depending on what information is needed).
a) (Re)reading the Lua Manual and PiL is strongly recommended.
b) Could you not break threads on this list, or at least put
in the same subject as in the message you're responding to?