[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: getn
- From: "Alberto Demichelis" <alberto@...>
- Date: Wed, 27 Feb 2002 18:08:31 +0100
I had a look in the manual this is why I'm asking if there is another
common solution! :O)
-----Original Message-----
From: Nick Trout [mailto:Nick.Trout@warthog.co.uk]
Sent: Wednesday, February 27, 2002 6:04 PM
To: Multiple recipients of list
Subject: RE: getn
>>I've got a simple question.
I'm storing into a table several items(other tables) using a numerical
index as key and I would like to know how many elements are into the
table.So I tryed with lua_getn(); The problem is that I'm not inserting
sorted elements, for instance if I insert the first element with key 8
getn() will return 8. Is there any way to have the real number of "non
nil" elements?
Write your own! :o)
getn returns the highest numerical key. Have a look in the manual.
nick