The_Sage & void main() | Bytes (2024)

Kwan Ting

The_Sage, I see you've gotten yourself a twin asking for program in
comp.lang.c++ .
http://groups.google.co.uk/groups?hl...c71c33c&rnum=1
If you the oh so mighty programmer that you pretend to be, why don't you
just write some? (And oh, void main is still not allow by the C++ standard.)

Seeming as how you tried to quote the standard in an attempt to pretend
you're right, I'll quote the standard to once and for all destory all your
arguements.

C++ standard 3.6.1 Main function
Paragraph 5
"A return statement in main has the effect of leaving the main function
(destroying any objects with automatic storage duration) and calling exit
with the return value as the argument. If control reaches the end of main
without encountering a return statement, the effect is that of executing
return 0;"

Now, not even an idiot like you can argue with what it says here. Either an
return value have been specificed, or the main function return 0 by default.
Could you please tell everyone in your (imaginary) infinte wisdom how main
can be of type void if it return a value?
(Oh btw, that paragraph from the standard is only 3 paragraphs down (on the
same page) from what you quoted, if only you had learn how to read
properly.....)

Kwan Ting
--
Experience is a good school but the fees are high.
- Heinrich Heine

Jul 19 '05

Subscribe Reply

192 The_Sage & void main() | Bytes (1) 8784 The_Sage & void main() | Bytes (2)

  • « First
  • <
  • 8
  • 9
  • 10
  • 11
  • 12
  • >
  • Last »

Greg Comeau

In article <04************ *************** *****@4ax.com>,
The_Sage <th******@azrmc i.net> wrote:

Reply to article by: co****@panix.co m (Greg Comeau)
Date written: 27 Sep 2003 20:09:04 -0400
MsgID:<bl**** ******@panix1.p anix.com>
.... listed all the C and
C++ compilers that used void main() in BOTH C and C++. In fact, if you could
learn to click on the link they gave to Microsoft, you would see where
Microsofts online documenation for their C++ compiler uses void main().

Yes, but the problem is that you have to also define the
context of such uses, as I clearly explained in another message.
For instance, with Comeau C++, if I have:

//voidmain.cpp, this is supposed to be Standard C++ code
void main()
{
}

No, that is your belief, not what the standard states. You aren't the standard
so it doesn't matter what you believe.

So coming full circle, you are not the standard either,
so it doesn't matter what you believe.

And for that matter, none of the vendors who reject the
code in strictly conforming mode aren't the standard either,
so it doesn't matter what they believe and have implemented.

That said, actually, I can argue that I and the other vendors
are the standard, since we wrote it.
I like void main() and I hope all the major compiler manufacturers
continue to provide it for their customers like me.
And no doubt they will. Certainly we will continue to support
it with Comeau C++. However, as I said, if we're talking about
a strictly conforming hosted situation, we will continue to
issue a diagnostic, by default. And the other compilers you
mention no doubt will continue to issue a diagnostic in that
mode too. In Comeau, we actually let you disable this
diagnostic even in strict mode, but to be honest, making
such a run would be super super rare.
Like I pointed out to poor little David,
there is no point in returning anything from main()
since once you exit main(),
that's it -- there is nothing to read your int.

That need not be so. Among many other situations, we write
UNIX and Windows programs all the time that reads it.
That's why it's there, some programs do want to read it.
Of course, some may not care.
--
Greg Comeau/4.3.3:Full C++03 core language + more Windows backends
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?

Jul 19 '05 #91

Attila Feher

The_Sage wrote:

continue to provide it for their customers like me. Like I pointed
out to poor little David, there is no point in returning anything
from main() since once you exit main(), that's it -- there is nothing
to read your int.

You are pathetic! Look at the Chapter 28 of the C++ standard and tell me
what it writes about the main function. Unless you do so I have to conslude
that you have no clue about C++ and you do not have the standard and all you
do is lie.

--
Attila aka WW

Jul 19 '05 #92

Attila Feher

The_Sage wrote:
[SNIP]

You still did not answer the question! Read and tell what Chapter
28 of the C++ standard says about the main function. If you don't,
we will all know you are a clueless idiot - to use your words.
Don't change the subject, especially when the issue now is if you can
even read or not.

I am not changing the subject. Look at the Chapter 28 of the C++ standard
and tell me what it writes about the main function. Unless you do so I have
to conslude that you have no clue about C++ and you do not have the standard
and all you do is lie.
The sentence in question taken from the standard
clearly was talking about the return type, not the parameters.
I don't care about your misguided opinions. Look at the Chapter 28 of the
C++ standard and tell me what it writes about the main function. Unless you
do so I have to conslude that you have no clue about C++ and you do not have
the standard and all you do is lie.
If you can't tell the difference between a return type and
parameter, you have lost all credibility.
And since I can, I did not. Look at the Chapter 28 of the C++ standard and
tell me what it writes about the main function. Unless you do so I have to
conslude that you have no clue about C++ and you do not have the standard
and all you do is lie.
In other words, you are a joke when it comes to
discussing anything at all about any computer language.
Then laugh and look at the Chapter 28 of the C++ standard and tell me what
it writes about the main function. Unless you do so I have to conslude that
you have no clue about C++ and you do not have the standard and all you do
is lie.
Why don't you try comp.lang.begin ning.programmin g where you will fit
right in?
Because unlike you, I know there is no such newsgroup. So instead of coming
up lame and pathetic attempts to joke, look at the Chapter 28 of the C++
standard and tell me what it writes about the main function. Unless you do
so I have to conslude that you have no clue about C++ and you do not have
the standard and all you do is lie.
Once again, the sentence in question that is clearly and obviously
speaking about the RETURN TYPE (see if you can catch it this time
'round)...
I don't care about your misguided opinions. Look at the Chapter 28 of the
C++ standard and tell me what it writes about the main function. Unless you
do so I have to conslude that you have no clue about C++ and you do not have
the standard and all you do is lie.
3.6.1 Main function paragraph 2:
"It shall have a return type of type int
-->BUT<--
otherwise its type is implementation-defined"

I don't care about your misguided opinions. Look at the Chapter 28 of the
C++ standard and tell me what it writes about the main function. Unless you
do so I have to conslude that you have no clue about C++ and you do not have
the standard and all you do is lie.

--
Attila aka WW

Jul 19 '05 #93

Randall Hyde

"Greg Comeau" <co****@panix.c om> wrote in message news:bl******** **@panix1.panix .com...


See, I just don't know what that has to do with parameters. It never
mentions the word. Nor have I noticed anyone else using that word
(other than you). So perhaps you could elaborate a bit?

"its" above is main, so the sentence with substitution is:

"main shall have a return type of type int
otherwise main's type is implementation-defined"

Note that the type of a function involves its parameters' types.
Note also that the return type of a function is not its type.

IOW, he is confusing the function's signature with its return type?
Okay, *now* I understand. If only he had stuck "int argc, char** argv"
in there someplace, his compiler would have issued the appropriate
diagnostics :-)
Cheers,
Randy Hyde

Jul 19 '05 #94

Mike Wahler

"The_Sage" <th******@azrmc i.net> wrote in message
news:04******** *************** *********@4ax.c om...

Reply to article by: co****@panix.co m (Greg Comeau)
Date written: 27 Sep 2003 20:09:04 -0400
MsgID:<bl***** *****@panix1.pa nix.com>
.... listed all the C and
C++ compilers that used void main() in BOTH C and C++. In fact, if youcouldlearn to click on the link they gave to Microsoft, you would see where
Microsofts online documenation for their C++ compiler uses void main().

Yes, but the problem is that you have to also define the
context of such uses, as I clearly explained in another message.
For instance, with Comeau C++, if I have:

//voidmain.cpp, this is supposed to be Standard C++ code
void main()
{
}

No, that is your belief, not what the standard states. You aren't the


standard

so it doesn't matter what you believe.

Really? If you'd stop to do a bit of research before
running your mouth, perhaps you'd realize that Greg
is one of the authors of the standard. I suspect he
does know what the words therein mean. The above isn't
his 'belief', but *fact*.
-Mike

Jul 19 '05 #95

Duane

> Really? If you'd stop to do a bit of research before

running your mouth, perhaps you'd realize that Greg
is one of the authors of the standard. I suspect he
does know what the words therein mean. The above isn't
his 'belief', but *fact*.

So far he's ignored comments by Herb Sutter, Andrew Koenig, Greg Comeau and
quotes from
Bjarn Stroustrup (not to mention pretty much everyone else here).

Jul 19 '05 #96

WW

Booooooring.

Jul 19 '05 #97

WW

Duane wrote:

So far he's ignored comments by Herb Sutter, Andrew Koenig, Greg
Comeau and quotes from
Bjarn Stroustrup (not to mention pretty much everyone else here).

But that isn't his biggest sin. He is plain boring. The worst boring troll
I have ever seen. No effort whatsoever.

--
WW aka Attila

Jul 19 '05 #98

WW

Noah Roberts wrote:

Now that I have upgraded my newsreader I can finally do this. You
will be the first person I have ever done this to on usenet ever.

Not me? ;-)

--
WW aka Attila

Jul 19 '05 #99

The_Sage

>Reply to article by: "Randall Hyde" <ra*******@eart hlink.net>

Date written: Mon, 29 Sep 2003 04:04:55 GMT
MsgID:<Hb***** ************@ne wsread3.news.pa s.earthlink.net >
Don't change the subject, especially when the issue now is if you can even read
or not. The sentence in question taken from the standard clearly was talking
about the return type, not the parameters. If you can't tell the difference
between a return type and parameter, you have lost all credibility. In other
words, you are a joke when it comes to discussing anything at all about any
computer language.

Forgive me for butting into this intellectually stimulating debate...

You are forgiven. You couldn't handle the last debate so there isn't any
indication you are going to stick up for someone else any better.

The Sage

=============== =============== =============== =============== =
My Home Page : http://members.cox.net/the.sage

"The men that American people admire most extravagantly are
most daring liars; the men they detest the most violently are
those who try to tell them the truth" -- H. L. Mencken
=============== =============== =============== =============== =

Jul 19 '05 #100

  • « First
  • <
  • 8
  • 9
  • 10
  • 11
  • 12
  • >
  • Last »

This thread has been closed and replies have been disabled. Please start a new discussion.

The_Sage & void main() | Bytes (2024)
Top Articles
Latest Posts
Article information

Author: Duane Harber

Last Updated:

Views: 5767

Rating: 4 / 5 (71 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.