[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [5.1.4/newbie] How to check end script?
- From: Steve Litt <slitt@...>
- Date: Mon, 7 Mar 2011 08:34:10 -0500
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