lua-users home
lua-l archive

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


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