From: firewind Newsgroups: comp.os.msdos.djgpp Subject: Re: Reading the command line Date: 29 Oct 1997 07:06:49 GMT Organization: Netcom Lines: 20 Message-ID: <636na9$sqn@dfw-ixnews6.ix.netcom.com> References: <3 DOT 0 DOT 16 DOT 19971029005208 DOT 1b97170c AT hem1 DOT passagen DOT se> NNTP-Posting-Host: elp-tx1-05.ix.netcom.com Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Peter Palotas wrote: > Howcome this is such a debated issue? Let the people who doesn't want to > return anything do so if that makes them happy. A program will compile > anyway, even if main isn't declared to return an int, possibly with a > warning, but sometimes not even that (depending on what compiler you use). > Personally I always declare main to return an integer since this is the > right thing to do, but it isn't neccessary as far as I can see, if you > don't want to return anything from main(). If you allow 'void main()' to be valid, you also allow 'if(1 + 1 == 3)' to be a true comparison. The standard says main() shall return int, and so int it shall return. -- [- firewind -] [- email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work) -] [- "You're just jealous because the voices talk to -me-." -] [- Have a good day, and enjoy your C. -] [- (on a crusade of grumpiness where grumpiness is due) -]