|
|
||
|
However, numeric for loops are restricted to an explicit argument list, so the first example won't compile:
function indicies(t) return 1, #t end for key = indicies(t) do print(key, t[key]) end
[snip]
The complete syntax does not give the reason for this, so what is the rationale behind this decision?
i=1 repeat ... i = 1+3 until i>10
to be more cleanly coded as:
for i=1,10,3 do ... end