Mail Archives: djgpp/1997/12/30/12:15:34
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 -