delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/30/12:15:34

From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Begginer problems with C & DJGPP
Date: Tue, 30 Dec 1997 17:16:41 +0100
Organization: none provided
Lines: 27
Message-ID: <34A91E69.3B7E9A2C@gmx.net>
References: <682ti1$keq$1 AT svr-c-02 DOT core DOT theplanet DOT net> <34A579C8 DOT 6B72 AT cs DOT com> <34A7D31D DOT 434B5D15 AT IHateSpam DOT com>
NNTP-Posting-Host: isdn37.hrz.tu-chemnitz.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ryan McGee schrieb:
> 
> why is useing void main() a bad idea?  I've heard that all over the place
> but nobody tells me why I shouldn't do that.  Does it have something to do
> with error checking?  What's going to check the return value of main?

There are sevaral reasons for not coding "void main()" beside the other
reasons (against ANSI or POSIX, I donīt know exactly :-( ) I will tell
you an other, especially for beginners.

Not only once in this group there were questions about the the
"exit-code"
which is reported by RHIDE when you run and exit your program from
within RHIDE. When using now "void main()" the returned value now
depends
only on the constallations of the stars at the sky and so the user will
be confused if (s)he gets randomly other "exit-codes".

Robert
-- 
******************************************************
* email:   Robert Hoehne <robert DOT hoehne AT gmx DOT net>     *
* Post:    Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW:     http://www.tu-chemnitz.de/~sho/rho        *
******************************************************


*********************************


- Raw text -


  webmaster     delorie software   privacy  
  Copyright Đ 2019   by DJ Delorie     Updated Jul 2019