lua-users home
lua-l archive

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


On Sun, 2008-05-11 at 12:24 +0800, CHU Run-min wrote:
> for i = 10, 1, 0 do
> 
> end
> 
> This results in an endless loop. Why not check step for zero?

Since you can escape the loop through breaking, yielding, or other
mechanisms, it isn't necessarily fatal.  It would be a rather unusual
language feature to throw an error in this case.

	Regards,
	nash