Path: utzoo!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.lang.c Subject: Re: is there anything wrong with return(n) from main? Message-ID: <11441@steinmetz.ge.com> Date: 1 Jul 88 13:14:23 GMT References: <741@vsi.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Distribution: comp Organization: General Electric CRD, Schenectady, NY Lines: 16 In article <741@vsi.UUCP> friedl@vsi.UUCP (Stephen J. Friedl) writes: | Hi net.folks, | | For some unknown reason, I have always felt uncomfortable | doing a return(n) from main: I used exit(n) instead. Can anybody Some versions of C don't use the value of the return from main as a call to exit. Instead, the assume that if you don't call exit with a value you terminated normally and should have a zero exit status. Your gut feeling is a good one, it will save you a lot of pain in the long run, I suspect. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs | seismo}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me