lua-users home
lua-l archive

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

On Fri, Nov 5, 2010 at 17:02, Francesco Abbate <> wrote:
> Hi all,
> I'm happy to announce, after a lot of work, the 1.0-beta1 release of GSL shell.
> [..snip..]
>  The library was (quite easily) rewritten in Lua, the most painful
> things was the lack of the "continue" statement and the different
> indexing conventions :-)

thanks a lot for your efforts! I will try it out.

Absence of the "continue" statement is very high on my Lua complaint
list. That said, you can emulate it using break inside repeat ...
until true construct like this:

for i=0,9 do
  if i>=3 and i<=7 then break end  --exclude i= 3,4,5,6,7
 until true

According to Roberto
this method generates optimal opcodes for "continue".
Unfortunately, you cannot have "break" and "continue" behavior withing
the same repeat...until block.

Hope it helps,