lua-users home
lua-l archive

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


On Monday 07 March 2011 05:02:16 Shmuel Zeigerman wrote:
> On 07/03/2011 11:40, Gilles Ganault wrote:
> > I need to exit a script in case the user forgot to pass a parameter,
> > and noticed that return works in the "if" block but doesn't when used
> > in the main loop:  [snip]
> 
> Instead of just `return', you can always say:
>    do return end
> and that will return from the script.

I didn't know that. I've always just used os.exit().

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt