|
Am 13.09.2012 16:42, schrieb Egor Skriptunoff:
On 9/13/12, Dirk Laurie <dirk.laurie@gmail.com> wrote:The syntax of the numeric "for" is: for Name ‘=’ exp ‘,’ exp [‘,’ exp] do block end I.e. the comma is part of the syntax, and exp ‘,’ exp [‘,’ exp] is not an expression list.Why numeric "for" syntax is not fully compliant with "Lua spirit" (it implies possibility to feel free with multiple values returned from a function anywhere instead of hard-coded list)?
May be an "iterator" what you are lokking for? E.g. see: http://www.lua.org/pil/7.1.html Cheers Frank