From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: 2 quick questions Date: Fri, 14 Aug 1998 23:22:19 -0700 Organization: Alcyone Systems Lines: 27 Message-ID: <35D5291B.1FAFD6FA@alcyone.com> References: <35D4F001 DOT 4A3E2B2D AT xyz DOT net> <35D4F431 DOT F5D956B8 AT cs DOT net> <35D525C5 DOT 9B79BFB AT xyz DOT net> NNTP-Posting-Host: kamali.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Bjorn Hansen wrote: > My programs that are successful often return a different exit code. > When > they fail I think they usually return 255. I don't put anything like > return(0); at the end. should I do this? Yes. main should always return type int. > Is there anything else an > exit > code tells you besides if the program was successful. It seems like > it must > since it does not just return a 0 or a 1. 0 indicates a successful return. Nonzero indicates unsuccessful return. Different nonzero values can be used to indicate different errors, but they are all program dependent. -- Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/ USA / icbm 37 20 07 N 121 53 38 W / &tSftDotIotE \ / Freedom is a road seldom travelled by the multitudes / Public Enemy