The_Sage & void main()

W

WW

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

WW

The_Sage said:
I see you don't know how to use a word search. Heck, even the title
tells you that they are talking about C and C++, ie -- "VOID MAIN()
IS NOT LEGAL IN C++ BUT IS LEGAL IN C". Funny how you missed that.
Then they listed all the C and C++ compilers that used void main() in
[SNIP]

This newsgroup is about the C++ language, as defined by its international
standard. If you whish to discuss the C language, you will need to post to
some other newsgroup:

http://www.parashift.com/c++-faq-lite/how-to-post.html#faq-5.9
 
K

Kwan Ting

Oh where art thous our lovely Sage :-D

Why don't you reply to what I posted? You can't dispute what the creator of
the language say ? Or is it that you can't think up another one of your lame
excuse ...

Kwan Ting
 
K

Kwan Ting

I see you don't know how to use a word search. Heck, even the title tells you
that they are talking about C and C++, ie -- "VOID MAIN() IS NOT LEGAL IN C++
BUT IS LEGAL IN C". Funny how you missed that. Then they listed all the C
and

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 ???

/me love how our lovely troll is way beyond any help anyone can give :D

Kwan Ting
 
G

Greg Comeau

Uh, duh!




Bwahaha! The subject is RETURN TYPE, not PARAMETERS. NO MENTION WAS MADE IN THAT
ONE F*CKING SENTENCE ABOUT PARAMETERS.

Thank you for giving me the oppotunity to irrefutably prove what a total idiot
you are.

There WAS a mention about parameters. There IS a difference between:

"It shall have a return type of type int but otherwise its type is
implementation-defined."

and

"It shall have a return type of type int but otherwise its RETURN
type is implementation-defined."

Unfortunately, the "legalese" nature could have been lessened
if "main()s" instead of "its" or something was used, though
the meaning is still clear and unambiguous in this case.
 
G

Greg Comeau

...
.... 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()
{
}

and compile it in non-strict mode, then it compiles with
a warning, which can be turned off, both of which is allowed.

E:\tmp>como voidmain.cpp
Comeau C/C++ 4.3.3 (Sep 23 2003 11:25:46) for _MS_WINDOWS_x86_Beta9
Copyright 1988-2003 Comeau Computing. All rights reserved.
MODE:non-strict warnings microsoft C++

"voidmain.cpp", line 1: warning: return type of function "main" must be "int"
void main()
^

However, if I compile it in Comeau strict mode, then it gives:

E:\tmp>como --A voidmain.cpp
Comeau C/C++ 4.3.3 (Sep 23 2003 11:25:46) for _MS_WINDOWS_x86_Beta9
Copyright 1988-2003 Comeau Computing. All rights reserved.
MODE:strict errors C++

"voidmain.cpp", line 1: error: return type of function "main" must be "int"
void main()
^

1 error detected in the compilation of "voidmain.cpp".

Similarly, if I compiler with VC++ in non-strict mode:

E:\tmp>cl voidmain.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

voidmain.cpp
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/out:voidmain.exe
voidmain.obj

However, if I compile it in strict C++ mode, it gives:

E:\tmp>cl /Za voidmain.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

voidmain.cpp
voidmain.cpp(2) : warning C4326: return type of 'main' should be 'int' instead o
f 'void'
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/out:voidmain.exe
voidmain.obj

which, although it is labelled "warning" actually meets the
requirements of Standard C++ regarding diagnostics.

Note as well that some standards allow for invalid input
to still render to an executable. That moves into something
else though.

So to say that a vendor allows something or other really
needs to be put into context. So, when you point out that
say MS documentation uses void main(), and I'm sure it does,
since I've seen it, you're referring to their non-strict mode.
 
N

Noah Roberts

WW said:
The_Sage wrote:

[ Who the **** cares? ]
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);

An interesting aside I just thought of: If the rest of main's signature
is implementation defined, I wonder what the standard has to say on this
one:

int main(stuff) const;

NR
 
N

Noah Roberts

The_Sage said:
I see you don't know how to use a word search. Heck, even the title tells you
that they are talking about C and C++, ie -- "VOID MAIN() IS NOT LEGAL IN C++
BUT IS LEGAL IN C". Funny how you missed that. Then they 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().

DUH!

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

NR
 
G

Greg Comeau

WW said:
The_Sage wrote:

[ Who the **** cares? ]
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);

An interesting aside I just thought of: If the rest of main's signature
is implementation defined, I wonder what the standard has to say on this
one:

int main(stuff) const;

If I recall, implementation-defined has a well-formed
characteristic, so this would seem a no-go.
 
M

Mike Wahler

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

Did it really take you this long to identify this
character as a troll?

-Mike
 
S

SomeDumbGuy

What is google?

http://www.faqs.org/docs/jargon/P/plonk.html

I suppose you are posting with the proper handle. :)

-Mike

I have seen your posts before in the C groups and it is good that you
are willing to take your time to help people with the language. But I
have also noted that you seem to have a smart reply for them.

Was that needed?

You may have seen another post I did, I searched on crosspost and
mulitipost. That seemed like something that would bring up an answer.
It never occurred to me that *plonk* would.

I have this name to remind myself to be humble.
Sometimes in the middle of your glory you can do something stupid.
 
W

WW

SomeDumbGuy said:
I have seen your posts before in the C groups and it is good that you
are willing to take your time to help people with the language. But I
have also noted that you seem to have a smart reply for them.

Was that needed?

You may have seen another post I did, I searched on crosspost and
mulitipost. That seemed like something that would bring up an answer.
It never occurred to me that *plonk* would.

I have this name to remind myself to be humble.
Sometimes in the middle of your glory you can do something stupid.

Print this, and it will remind you:

http://mars-attacks.org/~boklm/browse/humor/bart.gif
 
C

Chris Johnson

What is *plonk*?
[SNIP]
What is google?
I suppose you are posting with the proper handle. :)
-Mike
[SNIP]
Was that needed? [SNIP]
I have this name to remind myself to be humble.
Sometimes in the middle of your glory you can do something stupid.
Nice message in there but that's my opinion.

Brevity makes for some interesting communication misunderstandings.
Some people are "smart asses".
Some people are rude.
Some people are hyper-sensitive.
Some people are insensitive.
Some people are ignorant.
Some people are brilliant.
Some people are ...

What all people share in common is they have a unique perception all
their own that will invariably differ from someone else's.

USENET can be a resource for information, or it can be a total waste
of time. It can be pleasant and it can be hostile. USENET is a
culmination of peoples ideas and thoughts - some should be shared
while others should not. Take with you what works and discard what
doesn't. Life in general works like that...

To stay on-topic this has nothing to do with The C++ Standard.

Excuse me now while I go lower the score on this thread as simply
plonking the trolls is not enough to keep this from showing up
in my news reader.

C Johnson
 
S

SomeDumbGuy

Chris said:
What is *plonk*?
[SNIP]
What is google?
I suppose you are posting with the proper handle. :)
-Mike
[SNIP]

Was that needed?
[SNIP]

I have this name to remind myself to be humble.
Sometimes in the middle of your glory you can do something stupid.

Nice message in there but that's my opinion.

Brevity makes for some interesting communication misunderstandings.
Some people are "smart asses".
Some people are rude.
Some people are hyper-sensitive.
Some people are insensitive.
Some people are ignorant.
Some people are brilliant.
Some people are ...

What all people share in common is they have a unique perception all
their own that will invariably differ from someone else's.

USENET can be a resource for information, or it can be a total waste
of time. It can be pleasant and it can be hostile. USENET is a
culmination of peoples ideas and thoughts - some should be shared
while others should not. Take with you what works and discard what
doesn't. Life in general works like that...

To stay on-topic this has nothing to do with The C++ Standard.

Excuse me now while I go lower the score on this thread as simply
plonking the trolls is not enough to keep this from showing up
in my news reader.

C Johnson
$B;d$O(BC++ $B$H$9$kI,MW$,$J$+$C$?$,$3$3$K;HMQ$5$l$?8@MU$H$7$J$1$l$P$J$i$J$+$C(B
$B$?$3$H%K%f!<%9%0%k!<%W$N<ALd$r$7$?!#$=$l$O$"$C$?=>$C$F;d$O%]%9%H$r$h$j$h(B
$B$/M}2r$G$-$k!#;d$O1~Ez$GIn?+$5$l$FF@$k!#;d$O$"$J$?$N%a%C%;!<%8$,:G8e$NIt(B
$BJ,$^$G6=L#?<$+$C$?$3$H$r9M$($?!#:#;d$O(Btengu $B$G$"$k$+!#;d$O2??M$+$N?M!9%$(B
$B%s%?!<%M%C%H$K$?$/$5$s$N;~4V$r;H$&$3$H$r9M$($k!#;d$rF0$+$90Y$K$"$j$,$H$&!#(B
 
S

SomeDumbGuy

Chris said:
Excuse me now while I go lower the score on this thread as simply
plonking the trolls is not enough to keep this from showing up
in my news reader.

You are correct.
I should have remembered that my name was to keep myself humble, not
others. I have failed.

Still, it has been implied that I was dumb for asking in the first place.
I was always told "The only dumb question is the one that is never asked"

I have learned something, even if it came with some baggage.
I will go so far as to apologize if my reply was taken as rude.
I will also take your advice, and try not to worry about how other
people are, as I got the information I asked for.
Thank you
 
D

David B. Held

Noah Roberts said:
[...]
An interesting aside I just thought of: If the rest of main's signature
is implementation defined, I wonder what the standard has to say
on this one:

int main(stuff) const;

I think it still has to conform to the rest of the C++ rules. Since main()
isn't a member function, this signature doesn't even make sense. I
mean, what would this signature mean:

friend virtual static volatile int main(...) const = 0; // ???

Dave
 
W

WW

David said:
I mean, what would this signature mean:

friend virtual static volatile int main(...) const = 0; // ???

Hm, I think it would mean: The Sage posted again.
 
G

Greg Comeau

Noah Roberts said:
[...]
An interesting aside I just thought of: If the rest of main's signature
is implementation defined, I wonder what the standard has to say
on this one:

int main(stuff) const;

I think it still has to conform to the rest of the C++ rules. Since main()
isn't a member function, this signature doesn't even make sense. I
mean, what would this signature mean:

friend virtual static volatile int main(...) const = 0; // ???

I'm fairly certain is has to be otherwise well-formed.
 
M

Mike Wahler

SomeDumbGuy said:
You are correct.
I should have remembered that my name was to keep myself humble, not
others. I have failed.

Still, it has been implied that I was dumb for asking in the first place.
I was always told "The only dumb question is the one that is never asked"

I have learned something, even if it came with some baggage.
I will go so far as to apologize if my reply was taken as rude.
I will also take your advice, and try not to worry about how other
people are, as I got the information I asked for.
Thank you

Thank you for being gracious about this, and I do apologize
if I've offended you. But did you not see the smiley
after what I wrote? It indicated (apparently unsuccessfuly)
that my remark was to be taken as a friendly jibe. But in
general you are right, sometimes I can be a "smartass."
I'll work on it. :)

-Mike
 
T

The_Sage

Reply to article by: "WW said:
Date written: Sat, 27 Sep 2003 23:45:07 +0300
MsgID:<[email protected]>
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. 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.

Why don't you try comp.lang.beginning.programming where you will fit right in?

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

=============================================================
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,777
Messages
2,569,604
Members
45,202
Latest member
MikoOslo

Latest Threads

Top