[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Why does this exit the function early?
- From: Stefan Brantschen <sbr@...>
- Date: Sat, 20 Jun 2009 13:42:53 +0200
On 18 Jun 2009, at 19:08, Paul Butler wrote:
Why does the "break" end the function?
I was expecting it to count to 10 and just skip over 5.
See <http://www.lua.org/manual/5.1/manual.html#2.4.4>: "The break
statement is used to terminate the execution of a while, repeat, or
for loop, skipping to the next statement after the loop"