lua-users home
lua-l archive

Re: foreachi and artificial tables

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


Dave,
<< It wouldn't be difficult to do so, it would be impossible. >>
Rather what I was implying, but as Dirk replied, if foreach was a tag
method then something could be done.
For the moment I have implemented a "special" foreachi in C for my own
table. Redefining getn() would be more problematic, as it would need to
detect whether or not it was working on a "special" table. Making getn a
tag method would answer most of this problem, but until I have become more
confident with lua I'm not about to go extending the language in such ways.
Mike Goodey (G0GJV)
 

AltStyle によって変換されたページ (->オリジナル) /