Re: [patch] continue statement
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: [patch] continue statement
 
- From: Shannon Stewman <stew@...>
 
- Date: 2005年9月12日 12:13:22 -0500
 
On Mon, Sep 12, 2005 at 06:47:34PM +0200, Wolfgang Oertl wrote:
> I find that without a "continue" statement some loops soon have
> deeply nested if/else statements in them. This patch adds
> them to Lua 5.1-alpha. It's also on the PowerPatches page of
> the Lua wiki.
Here is another example where a standard way to do non-local exit would
help. The syntax was proposed in
http://lua-users.org/lists/lua-l/2005-08/msg00357.html
for i=1,100 do
 block(continue)
 ...
 if some_test_to_continue then continue() end
 ...
 end
end
Cheers!
-- 
Shannon Stewman | Let us walk through the waning night,
Caught in a whirlpool, | As dawn-rays tickle our toes, the dew soothes
A quartering act: | Our blistered soles, and damp bones stir
Solitude or society? | As crimson cracks under the blue-grey sky.