Bill Baxter:
What does it return now?
A random int, I presume.
I always assumed returned zero for void main.
Me too.
Bye,
bearophile
On Tue, Jan 20, 2009 at 10:25 AM, bearophile bearophileh...@lycos.com wrote:
Bill Baxter:
What does it return now?
A random int, I presume.
I always assumed returned zero for void main.
Me too.
I've only ever seen void mains return 0. I think they used to return
random ints but that was
bearophile wrote
I post this here, but if later I see it fit I may post something in the
main D group too.
D allows to have the main() function of type void too. In such case I'd
like the program return 0 by default. If people agrees, this can become a
feature request.
A test:
Jarrett Billingsley Wrote:
On Tue, Jan 20, 2009 at 12:21 PM, Steven Schveighoffer
schvei...@yahoo.com wrote:
So it appears it returns 0 unless you return something else (!)
Ha!
Yes (but not always), even though specs clearly say that void functions
evaluate return values and discard