lua-users home
lua-l archive

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


Javier Guerra wrote:
On 2/25/08, Shmuel Zeigerman <shmuz@actcom.co.il> wrote:
IMO, the value of having 'continue' would be much greater than that of
 this scope rule. I'd love to see canceling this rule in favor of adding
 'continue'. That is, the expression-parameter of 'until' would resolve
 its variables in the scope enclosing the repeat loop.

i'd vote that way too.  but how to do the transition? adding warnings
to the compiler??

I think no warnings are needed. As in all other cases, it is the programmer's responsibility to take the scope into account. E.g., if the code says 'until x > 0', and x is not defined in the enclosing scope, it'll result in the run-time error "attempt to compare nil with number'.

--
Shmuel