lua-users home
lua-l archive

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


On Sun, Jan 23, 2011 at 08:16:10PM +0200, Mark Hamburg wrote:
> Three seemingly simple answers to the repeat/until v continue problem (in
> order of decreasing harshness but more complex definitions):
> 
I haven't been following this discussion all that closely, so please
forgive me if I have missed a point that has been made.

The most common use of continue occurs when it is required once per 
loop.  In that case, it actually costs four extra keystrokes.

while condition do
  -- some code
  if test then 
    continue 
    end
  -- more code
  end

while condition do
  -- some code
  if test then 
  else
    -- more code
    end 
  end

If you require it more than once, you'll save only whitespace.
It will still need four extra non-blank characters per instance.

You expect, seriously expect, Roberto to add another keyword just
so you can do THIS???

Dirk