lua-users home
lua-l archive

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


I too miss break and continue... Also, I think the "FOR" notation below
far beats the proposed one... It makes sense as you read it.

Bret

> -----Original Message-----
> From:	Carlos Augusto Teixeira Mendes [SMTP:cmendes@tecgraf.puc-rio.br]
> Sent:	Thursday, October 30, 1997 4:29 AM
> To:	Bret Mogilefsky
> Subject:	Re: for loops
> 
> 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.
> 
> Regards,
> Carlos Augusto.
> 
>