S
SomeDumbGuy
Mike Smith wrote:
What is *plonk*?
Won't you folks all just *plonk* this loser already?
What is *plonk*?
Won't you folks all just *plonk* this loser already?
SomeDumbGuy said:Mike Smith wrote:
What is *plonk*?
Won't you folks all just *plonk* this loser already?
The_Sage said:You C++ types aren't the brightest group on the web, are you? We have been
through this already. The ISO C++ Standard also says that you can optionally
return other types, ie -- int main() is one required type but void main() is
another, optional return type. It is "implementation-defined" as the actual
standard puts it. Notice how the above article goes on to list all the C++
compilers that allow void main(), such as IBM, MS, and Borland, yet they
are all ISO compliant.
Read the link man, they are talking about C. C and C++ are not the same
thing. From your own source:
"void main() is not legal in C++ but is legal in C. "
Pay special attention to "void main() is not legal in C++"
To continue:
"The ISO C++ Standard (ISO/IEC 14882:1998) specifically requires main to
return int. But the ISO C Standard (ISO/IEC 9899:1999) actually does not. "
Of special importance to this subject is the text, "The ISO C++ Standard
... requires main to return int."
Most C compilers also compile C++. Here is the part you seem to like to
flout like it confirms your position:
"Watcom C/C++. The *C* Library Reference for Watcom's *C* compiler says
that "the main function can be declared to return void"." [emphasis added]
Note that this entire page is about a different language than C++. But
to go on:
"Some compilers do not provide this loophole"
Also note that the author of the page wishes that the *C* standard was
changed so that void main could not be allowed. It is but an error in
grammar which allows it...
"Because of the semi-colon, its final sentence parses as follows: "
Also of note:
"However, Greg Comeau was shown this web page, and in response changed
the examples to use int main()."
Which is rather interesting since this page says that according to the C
standard void main is ok in that language. Apparently the author of
this website convinced Mr. Comeau that, though it is apparently legal,
nobody should use void main(). Apparently this, and the fact that they
speak of C and explicitly state that int is the only legal return type
in C++ according to the standard, was missed by you.
Most important in this whole fiasco is that you yourself provided the
source that has proven you wrong so doubtlessly. Even if you don't
believe the standard and wish to misconstrue its meaning, you apparently
believe this website which states beyond confusion:
"void main() is not legal in C++ ..."
Your position is hopelessly lost as you have cut your own throught.
Check and mate.
Reply to article by: "WW said:Date written: Fri, 26 Sep 2003 06:57:03 +0300
MsgID:<[email protected]>
Yes, and you have been porved wrong. You are not the brightest, are you?
Reply to article by: Noah Roberts said:Date written: Thu, 25 Sep 2003 22:30:16 -0700
MsgID:<[email protected]>
Read the link man, they are talking about C. C and C++ are not the same
thing. From your own source:
Reply to article by: "Phlip said:Date written: 26 Sep 2003 14:56:51 GMT
MsgID:<[email protected]>
However, I have carefully researched this issue, for many, years, and I have
come to the conclusion that one should not use void main, and should prefer
int main, for a number of valid technical reasons.
Void main:
* causes illiteracy in lab mice
* inspires television networks to move reality shows to the next logical
step: Human sacrifice
* will transmit the contents of your internet cache folders to the nearest
repressed fundamentalist priest
* will precipitate the return of the Joe Isuzu commercials (1999/11/20)
* causes destructive thread recidivism in technical newsgroups
* will attract biker gangs to your granma's neighborhood
* is a capitalist plot
* nutates the precession of the equinoxes
* has designs on your kid sister
* makes killer bees think you smell like Chanel No. 5
* inspires white supremacists to come "out" about their thing for Reggae
music
* will inspire mass media to get over this current cheerleader thing
* denies workers control over the means of production
* relaxes the prohibitions against split infinitives (1999/04/24)
* is caused by orbiting microwave platforms that target the thermal
resonance signature of your neurons
* makes Disney executives have vivid anxiety dreams about not litigating
enough
* makes folks >still< think alien beings make crop circles
* uses NFL broadcasts without the expressed written consent of Fox Network
* will make your loved ones think you have been possessed by aliens
* will make you blind, grow hair on your palms, and convince you to vote
Republican
* increases the chances air traffic controllers accidentally cross flight
corridors directly over your house
* makes street lunatics think you are part of the conspiracy against them
* points the Hubble Space Telescope at your house
* makes IBM think they have a prayer of solving the Protein Folding Problem
in less time than the Sun takes to burn out
* makes George Lucas think we can tell the difference between any of his
StarWars movies
* makes your balls drop off
* inspires a remote tribe in Borneo to carve big wooden statues that look
just like you
* causes Phlip's big toe to swell up like a balloon
* inspires Hollywood executives to sign off on yet another insipid
live-action remake of an insipid 1970s cartoon
* has been cruely tested on charismatic dolphins and adorable baby seals
* has already caused the return of Joe Isuzu, as I prophesied on this
newsgroup last year (2001/04/04)
SomeDumbGuy said:void main() is not legal in C++ but is legal in C.
The_Sage said:No, they were talking about both. Do a word search.
Mike said:
The_Sage said:Hehe! Thank you for proving my point about how people like you aren't
the brightest guys on the web.
Let me reiterate the part you haven't
read and therefore have yet to refute in an intelligent or factual
manner...
From the ISO standard:
"3.6.1 Main function paragraph 2:
It shall have a return type of type int..."
Which all ISO compilers like MS, Borland, and IBM do.
"...but otherwise..."
See that word? It means that the standard allows breathing room for
other return types IN ADDITION TO int main().
"...its type is implementation-defined"
Therefore, any compiler that implement-defines other types of main()
functions, in addition to int main(), types like void main() for
example, are ISO compliant,
hence since MS, Borland, and IBM use int main()
AND ALSO IMPLEMENT/DEFINE void main(),
they are therefore also ISO compliant.
I have yet to be proved wrong
-- care to give it try yourself?
Stop
your yapping and let's see what you are really made of.
Hehe! Thank you for proving my point about how people like you aren't the
brightest guys on the web. Let me reiterate the part you haven't read and
therefore have yet to refute in an intelligent or factual manner...
From the ISO standard:
"3.6.1 Main function paragraph 2:
It shall have a return type of type int..."
Which all ISO compilers like MS, Borland, and IBM do.
"...but otherwise..."
See that word? It means that the standard allows breathing room for other return
types IN ADDITION TO int main().
"...its type is implementation-defined"
Therefore, any compiler that implement-defines other types of main() functions,
in addition to int main(), types like void main() for example, are ISO
compliant, hence since MS, Borland, and IBM use int main() AND ALSO
IMPLEMENT/DEFINE void main(), they are therefore also ISO compliant.
I have yet to be proved wrong -- care to give it try yourself? Stop your yapping
and let's see what you are really made of.
WW said:
Mike said:LOL, thanks for that. I know several people who need to
see it.
The_Sage said:Haha! I'm glad to see that someone around here is intelligent enough to have a
sense of humor!
Reply to article by: "WW said:Date written: Sat, 27 Sep 2003 12:59:31 +0300
MsgID:<[email protected]>
No it says (as one f*cking sentence):
"It shall have a return type of type int but otherwise its type is
implementation-defined."
The same written in C++:
int main(herecanbeanything);
That is what it means, brainless The Sage.
Reply to article by: Noah Roberts said:Date written: Fri, 26 Sep 2003 19:38:54 -0700
MsgID:<[email protected]>
A word search does not work, you must *read* the site.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.