Mail Archives: djgpp/1996/09/09/11:17:20
Date: Sat, 7 Sep 1996 02:13:15 +0100
From: Paul Shirley <Paul AT chocolat DOT foobar DOT co DOT uk>
In message <9609061402 DOT AA04554 AT quasar DOT bloomberg DOT com>,
kagel AT quasar DOT bloomberg DOT com writes
> It almost always runs just 1 program, which exits catastrophically when
> the user kills the power... now tell me again, what was the return value
> used for?
>
>It does not matter whether the runtime startup code or OS, if there is one,
>does with the return code. The discussion is whether it is "good C" to write
>main() as a type void function. The definitive answer, discussed for several
>weeks just two months ago, is that the language definition REQUIRES that the
>function main() return an int, period. End of discussion PLEASE!
You admitted lack of knowledge but posted *nonsense* anyway. Please
don't invent justifications for C rules, they aren't needed.
FLAME ON! (Please sprinkle appropriate epiteths and derogatory pronouns
liberally thoughout the following as I will not lower myself to put them in
myself.)
1) I admitted to no such lack of knowledge as I lack no knowledge. (OK I don't
know how to get my kids to move faster than snails but that's off topic!)
2) I do not need to invent any justification for the rules, and did not even
state any justification, the rules self justify by definition. The C language
states that main() returns int. Main() MUST return an int! If there is no OS,
as in the current discussion of embedded microcontrollers, then the startup
code will simple bury the return, if indeed main() ever actually returns (see
I did read the postings).
>May I also suggest that any future attempts to discuss this topic and several
>other religious wars be simply directed to the news archives.
May I suggest that you take the time to find out what you are talking
about before posting. (In fact, try *reading* other peoples posts and
reply to their actual content)
3) May I take this opportunity to suggest that you carefully read and accept
the advice of your betters. My posting was intended to quench a fruitless
discussion before it became another holy war or flame war. Obviously anyone
who says, in effect: "I do not need to follow the rules because I do not
understand how they apply to my and my situation" will do as he/she pleases and
write "void main()" no matter how many of us tell him/her that he/she should do
otherwise.
Now that you have ignited this flame war it is just unfortunate that you have
only a paper match with which to fight it. (Oh darn I lowered my standards
there! <Abject embarrasment> ;< )
FLAME OFF!
To everyone else please accept my apology for allowing myself to be drawn into
one of the very few flamings on this excellent forum.
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -