[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: new to lua; two small questions; observation
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 30 Jan 2006 13:28:01 -0200
> > function square(state,n) if n<state then n=n+1 return n,n*n end end
> > for i,n in square,5,0 do print(i,n) end
>
> I thought I understood how "for" worked [...] I don't see the general
> rule to which this conforms.
See http://www.lua.org/manual/5.0/manual.html#2.4.5 (the second part).