lua-users home
lua-l archive

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


>>for x in { "foo1", "foo2", "bar", "baz" } do ... end
Ciao, ET.
>>PS: Has someone an idea for an alternative syntax?  It's so similar
to the regular unordered "for i,v in" loop.  I would prefer a syntax
that makes it more obvious that it is an ordered loop and not just
the regular one without the 'v' var.

I was thinking that as well. Could you not have

for [i,]v in list do blah end

since i,v are not optional?

N