Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Return vs. exit in main() [WAS Re: "exit 0;" - or - "exit (0);" ?] Message-ID: <5400@brl-smoke.ARPA> Date: Fri, 21-Nov-86 17:45:41 EST Article-I.D.: brl-smok.5400 Posted: Fri Nov 21 17:45:41 1986 Date-Received: Tue, 25-Nov-86 21:13:52 EST References: <6355@alice.UUCP> <1556@batcomputer.tn.cornell.edu> <2330@diamond.Diamond.BBN.COM> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Distribution: net Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 7 In article <2330@diamond.Diamond.BBN.COM> mlandau@Diamond.BBN.COM (Matt Landau) writes: >Does the most recent ANSI draft have anything to say on this subject? Yes. main() is an int-valued function; its return value is used the same way as it would have been if termination were achieved by invoking exit() with the same value as a parameter. If you don't return anything, the termination status is undefined, as one would expect.