lua-users home
lua-l archive

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


What's the rationale behind being able to do "for i=1,10" but not "for i=string.byte("AZ",1,2)"? (i.e. why are commas syntactically significant in this case, but not in "for x,y in next, t"?)

(Ofc, if we had a range() instead of numeric for, we would be able to do "for i in range(string.byte("AZ",1,2))", and then this question would make no sense, but we don't. So, what's the rationale?)
-- 
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.