lua-users home
lua-l archive

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


On Sat, May 22, 2010 at 03:42:23PM +0300, M Joonas Pihlaja wrote:
> > Without ipairs(), how do I code this convenient (and clear) idiom:
> > 
> > --
> > 
> > for _,v in ipairs{'lumpi','ist','mein',hund'} do
> >    print(v)
> > end
> 
> Using pairs().
> 
> for _,v in pairs{'lumpi','ist','mein',hund'} do
>    print(v)
> end

this might as well print Yoda-ish "mein hund lumpi ist".
("my dog lumpi is")