[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: foreachi and artificial tables
- From: Dave Bollinger <DBollinger@...>
- Date: Sun, 8 Aug 1999 12:10:56 -0400
>> Redefining getn() would be more problematic, as it would need to
>> detect whether or not it was working on a "special" table.
This is one of my favorite aspects of Lua. :-) I frequently use it to
redefine tostring() so I can easily print debug dumps of custom structures.
There's lots of uses. Your getn() might look something like:
if (tag(t) == MySpecialTag)) then