lua-users home
lua-l archive

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

On Fri, 15 Feb 2002, Markus Huber wrote:

> Is this an official behaviour also in future Lua versions?
> for Loop=0,1,-1 do
>    print('Never') --> not executed
> end
> print('Ready') --> 'Ready'

You mean, not running the body when the initial value is already "past" the
final one? Yes, is this is an official behavior.

> And is the old rule also correct with Lua: that code in the for loop
> reduces the speed of the loop massively?

Not at all. Code inside the loop only reduces the loop speep by the time
the code itself takes to run. (Unless the code inside the loop is really
huge, and then you may get some problems with paging??)

-- Roberto