August 21, 2015 main() return code. | ||||
---|---|---|---|---|
| ||||
Why is it acceptable to specify main as returning void (in addition to returning int)? |
August 21, 2015 Re: main() return code. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tony | On 08/21/2015 01:49 AM, Tony wrote:
> Why is it acceptable to specify main as returning void (in addition to
> returning int)?
void in that context means automatically return 0 if main() exits without exception and non-zero if it exits with exception.
Ali
|
Copyright © 1999-2021 by the D Language Foundation