[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4/newbie] How to check end script?
- From: Matthew Wild <mwild1@...>
- Date: Mon, 7 Mar 2011 09:45:39 +0000
On 7 March 2011 09:40, Gilles Ganault <gilles.ganault@free.fr> wrote:
> Hello
>
> I have a newbie question for which Google didn't really help.
>
Valid question. The answer is in the manual:
"The return and break statements can only be written as the last
statement of a block."
Further reading: http://www.lua.org/manual/5.1/manual.html#2.4.4
Since the code after return or break would never be executed anyway,
this is considered a rather unimportant syntax limitation.
Regards,
Matthew