[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Return an exit code without os.exit()?
- From: Patrick Donnelly <batrick@...>
- Date: Wed, 7 Oct 2009 15:57:21 -0300
On Wed, Oct 7, 2009 at 3:36 PM, Geoff Leyland <geoff_leyland@fastmail.fm> wrote:
> I didn't know that! You mean like this?
>
>> function a() end
>> function b() return nil end
>> =select("#", a())
> 0
>> =select("#", b())
> 1
>
> Or is there another way?
select is the only way to count the number of values in an expression
list (either, varargs ... or the return values from a function).
--
-Patrick Donnelly
"Let all men know thee, but no man know thee thoroughly: Men freely
ford that see the shallows."
- Benjamin Franklin