Re: Why does this exit the function early?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Why does this exit the function early?
- From: Stefan Brantschen <sbr@...>
- Date: 2009年6月20日 13:42:53 +0200
Hi
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"
With regards
-- Stefan