[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: for loops
- From: Carlos Augusto Teixeira Mendes <cmendes@...>
- Date: Thu, 30 Oct 1997 10:32:07 -0200
At 15:07 29/10/97 -0200, you wrote:
>We'd like your opinion on whether we should add a FOR loop to Lua:
>1. Do you miss FOR loops?
Yes, I do miss for loops, and also miss "break" and "continue" instructions.
>2. What syntax would you suggest?
Well, thats a matter of taste, but I would suggest:
FOR statement1 WHILE expression THEN statement2 DO block END
In my opinion, it reflects in a better way the real order of execution of
statement1, expression and statement2.