main() return code.

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 21 02:02:29 PDT 2015


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



More information about the Digitalmars-d-learn mailing list