Message-Id: <3.0.16.19971029215033.35b7c09c@hem1.passagen.se> Date: Wed, 29 Oct 1997 22:25:06 -0500 To: firewind From: Peter Palotas Subject: Re: Reading the command line Cc: djgpp AT delorie DOT com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk At 07.06 1997-10-29 GMT, you wrote: >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. If this is so, why doesn't the compiler generate an error for declaring main() as 'void main()'? -- Peter Palotas alias Blizzar -- blizzar AT hem1 DOT passagen DOT se -- ***************************************************** * A brief description of DJGPP: * * NEVER BEFORE HAS SO FEW DONE SO MUCH FOR SO MANY! * *****************************************************