lua-users home
lua-l archive

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


>From: Philippe Lhoste [mailto:PhiLho@gmx.net]

>You can write:
>ln = getn(list)
>for i = 1, ln do
>  local v = list[i]
>end

There's no need to do this - the loop limit is evaluated only once (or so
says the Reference Manual).
-Virus scanned and cleared ok