The_Sage & void main()

T

The_Sage

Reply to article by: "Kwan Ting said:
Date written: Sat, 27 Sep 2003 22:29:56 +0100
MsgID:<[email protected]>
No, the real funny thing is how you can't read what yourself is posting!
Now, which bit of "VOID MAIN() IS NOT LEGAL IN C++" don't you understand ???

We aren't reading anything taken from the ISO standard at that link, are we?

No, we are not.

So it doesn't matter what it says in regard to what is "legal" or not.

DUH!

I know this is probably going to be way over your simple-mind head to understand
this time 'round again, but the point was that it listed for me, all the
compilers that use void main(). That way there could be no doubt which C++
compilers use void main().

That was the point...get it this time? The point wasn't what they claimed on
their site without any facts to back it up with, the point was which compilers
used void main(). Duh! And the only reason I used that link to begin with is
because someone said that not one major C++ compiler used void main(). I proved
them wrong.

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
=============================================================
 
T

The_Sage

Reply to article by: (e-mail address removed) (Greg Comeau)
Date written: 27 Sep 2003 20:09:04 -0400
MsgID:<[email protected]>
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.

I like void main() and I hope all the major compiler manufacturers 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.

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
=============================================================
 
T

The_Sage

Reply to article by: Noah Roberts said:
Date written: Sat, 27 Sep 2003 18:15:11 -0700
MsgID:<[email protected]>
This guy has to be pulling our legs. Noone that is as ignorant as ^that
could survive outside of a lab environment. He's trolling and we all
fell for it. It has been fun, but I am done :p

Ah, somebody else who can't read simple english, and can't tell the link in
question is NOT a link to the ISO standard, nor is it an authority on the ISO
standard. It was just a link to show that other C++ compilers use void main(),
not as proof whether void main() was "legal" or not. For that proof, I defer you
to the ISO standard instead of a personal web page. Capice?

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
=============================================================
 
N

Noah Roberts

The_Sage said:
Ah, somebody else who can't read simple english, and can't tell the link in
question is NOT a link to the ISO standard, nor is it an authority on the ISO
standard. It was just a link to show that other C++ compilers use void main(),
not as proof whether void main() was "legal" or not. For that proof, I defer you
to the ISO standard instead of a personal web page. Capice?

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.

*plonk*

bye bye now...
NR
 
G

Gary Labowitz

et.al.
I just got back from checking the.sage web site. Oy. It is such a jumble of
illogic and misinformed opinion that it is worthless except as a bad example
to lead the unknowledgeable astray. It is one giant troll. Except I think he
means it. He is a true believer, gang, and as such, cannot be convinced of
anything except what he believes.
It is clear that he doesn't know C++, philosophy, theology, and logic. He
knows enough cosmology to be dangerous.
Might as well give it up. I do.
 
R

Randall Hyde

The_Sage said:
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...
But I'm a bit confused here. You keep mentioning the word "parameters".
You are the only one who keeps bringing this term up. I'm just a simpleton,
moron, idiot, and I'm certainly ignorant in these matters; I simply don't see
what "parameters" has to do with this discussion. Could you please explain
what you're talking about? And please give some examples because I'm a
little slow and incapable of reading that confusing specification. As best
I can tell from the exchanges going on, people *are* talking about the
return type, not any "parameters". So I'd appreciate you explicitly explaining
what you mean by parameters because it has left me totally confused.

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)...

3.6.1 Main function paragraph 2:
"It shall have a return type of type int
-->BUT<--
otherwise its type is implementation-defined"

The Sage

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?
Cheers,
Randy Hyde
 
R

Randall Hyde

The_Sage said:
I like void main() and I hope all the major compiler manufacturers 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.

I suspect that there are many Windows, Unix, and Linux programmers who
would strongly disagree with your statement. Every one of these operating
systems provides the ability to query the program's return value. For example,
as a Windows programmer, surely you've come across the ExitProcess API
call. Ever wonder what the parameter you pass ExitProcess is for? After all,
the program is quitting, why would it want to pass a value there? Ever heard
of the GetExitCodeProcess or GetExitCodeThread API functions? I wonder
what it is that they are retrieving? And that's just Windows (which you claim
to be familiar with). Other OSes provide similar facilities. And guess what?
The return value that main returns *is* the "exit code" that these API functions
are dealing with. Surely as a hard-core Windows programmer you would
understand this. We can probably forgive you for ignorance involving *NIX
OSes, but you're the Windows/VC++ king, so you *must* know about
Windows' exit codes, right?
Cheers,
Randy Hyde
 
T

Trent WADDINGTON

In comp.lang.c++ Randall Hyde said:
I suspect that there are many Windows, Unix, and Linux programmers who
would strongly disagree with your statement. Every one of these operating
systems provides the ability to query the program's return value.

Of course, you're absolutely right, but then again, ::exit() is in the
standard library for a reason.

Trent
 
R

Randall Hyde

Gary Labowitz said:
I just got back from checking the.sage web site. Oy. It is such a jumble of
illogic and misinformed opinion that it is worthless except as a bad example
to lead the unknowledgeable astray. It is one giant troll. Except I think he
means it. He is a true believer, gang, and as such, cannot be convinced of
anything except what he believes.
It is clear that he doesn't know C++, philosophy, theology, and logic. He
knows enough cosmology to be dangerous.
Might as well give it up. I do.

You do see, know, where he has developed his debating skills and sense
of logic, eh? All that practice in *.religion.* has proved quite useful for
sharpening his ability to debate logically :)
Cheers,
Randy Hyde
 
G

Greg Comeau

Forgive me for butting into this intellectually stimulating debate...
But I'm a bit confused here. You keep mentioning the word "parameters".
You are the only one who keeps bringing this term up. I'm just a simpleton,
moron, idiot, and I'm certainly ignorant in these matters; I simply don't see
what "parameters" has to do with this discussion. Could you please explain
what you're talking about? And please give some examples because I'm a
little slow and incapable of reading that confusing specification. As best
I can tell from the exchanges going on, people *are* talking about the
return type, not any "parameters". So I'd appreciate you explicitly explaining
what you mean by parameters because it has left me totally confused.



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.
 
G

Greg Comeau

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.
 
A

Attila Feher

The_Sage wrote:
[SNIP]
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.beginning.programming 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.
 
A

Attila Feher

The_Sage said:
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.
 
R

Randall Hyde

Greg Comeau said:
"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
 
M

Mike Wahler

The_Sage said:
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
 
D

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).
 
W

WW

Duane said:
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.
 
T

The_Sage

Reply to article by: "Randall Hyde said:
Date written: Mon, 29 Sep 2003 04:04:55 GMT
MsgID:<[email protected]>
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
=============================================================
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top