lua-users home
lua-l archive

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


Sorry, just couldn't resist the following :)

On 8/30/05, Rici Lake <lua@ricilake.net> wrote:
> int i; for (i = 1; i <= 10; ++i) { ... }
> for i = 1, 10 do ... end
> 
> Advantage: Lua, 16 fewer keystrokes

Not so.  Having once defined

#define DO(var,from,to) for (var=from; var<=to; ++var)

then

DO(i,1,10) {...}