Re: The worst 'hello world' example ever written...

W

WW

The_Sage said:
And I quoted it back to where it clearly stated that additional
return types were allowed. Read it again and see what you've been
missing.

So let's agree: I have quoted it, you don't even have an idea where to find
it.

And no, what you have quoted said: the return type *must* be int, but the
function might take any number of arguments.
In the meantime, please explain why you are unable to answer why MS,
IBM, and Borland all agree with my interpretation and not yours?

MS, IBM and Borland all agree with my understanding. Unlike yours, it is
not an interpretation.
 
W

WW

The_Sage said:
Just because the compiler is ISO compliant doesn't mean it is ISO
complaint? Oh, I'm really convinced now! With such irrefutable
"logic", who can stand up to you?

Here we do not talk about the compiler being ISO compliant or not. We talk
about your code, which is *not*.
 
M

Mitch Crane

You live in an ignorant world where optional things are prohibited.

No, I live in a world where optional things are not prohibited. Since a
return type of int is mandatory, all other return types are prohibited.

In your world, return type int is both mandatory and optional and other
types which are prohibited by the above mandate are allowed. In your
world, return type int is mandatory. But not really. They were only
kidding when they said mandatory, because return return type void is also
allowed. In which case I suppose we can say that return type void is also
mandatory, since mandatory actually means optional. And it goes without
saying that the same applies to all other return types--they're all
mandatory, but optional.
 
M

Mitch Crane

Bullshit. Like I clearly pointed out to you before, IBM, MS, and
Borland agree with me.

I'm sure you'll be able to cite where IBM, MS, and Borland say that
return type void is standard conformant. I know what you're thinking. You
think don't need to cite anything, because you think the fact that their
compilers allow it makes it compliant. How silly of you.
 
M

Mitch Crane

Wrong again. The compiler is ISO compliant.

Yes, you are wrong again. The compiler may be compliant. The code isn't.
The fact that the compiler can compile non-conforming code doesn't turn the
code into conformant code.
 
R

Randall Hyde

WW said:
I have finally found out what the Sage abbreviation stands for: Seriously
Abnormal Gibberish Emitter.

Hmmmm...
I also thought that it was short for "sage brush" ;-)
Cheers,
Randy Hyde
 
M

Mitch Crane

Just because the compiler is ISO compliant doesn't mean it is ISO
complaint? Oh, I'm really convinced now! With such irrefutable
"logic", who can stand up to you?

You've confused yourself again. You can't seem to differenciate between
your non compliant code and your compliant compiler. But I'm sure you
were just being deliberately obtuse, or perhaps you think a compiler
can't compile non-compliant code if the compiler itself is compliant.
 
G

Gary Labowitz

Let's get to the real nitty-gritty:

Mr. "The_Sage" if you came to me for a C++ programming job, you wouldn't be
hired. Your knowledge or lack of about C++ wouldn't even be the issue. I
would note (by checking your ng posts, a more common thing for hiring
managers to do nowadays) that you bicker over trivialities, can't admit
error on your part, divert attention from issues to personalities, arguments
over grammar vs. spelling, etc. and can become abusive when faced with
irrefutable evidence. You show a lack of humor and would be categorized as a
"baby" in most organizations.

Since organizations with intention of doing real work for profit can't tend
to babies in their midst, you would not be hired. I have worked in a lot of
companies over the years and persons with the attitude you display are
always the ones we have gotten rid of first because they are so hard to work
with and create problems.

Why would an issue like void main be so important to you, anyway?
[Rhetorical question, please don't bother answering it.]

Grow up.
 
F

Frank Kotler

The_Sage said:
In the meantime, please explain why you are unable to answer why MS, IBM, and
Borland all agree with my interpretation and not yours?

Since you told me that I wasn't using the correct command-line switches
to compile your example, and since you won't tell me what the correct
command-line switches are, and since I'm *way* too lazy to RTFM, I
proceeded in my usual trial-and-error fashion. Being a methodical guy, I
started with "/A"...

------------------------
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
hwcpp.cpp:
Warning W8020 c:\lang\Bcc55\include\istream.h 445: 'std::eek:perator ==
<T,charT,traits,Distance>(const
istream_iterator<T,charT,traits,Distance> &,const
istream_iterator<T,charT,traits,Distance> &)' is declared as both
external and static
Error E2067 hwcpp.cpp 3: main must have a return type of int in function
main()
*** 1 errors in Compile ***
------------------------

So it seems that Borland *does* know about this stuff, they were just
being nice. We've heard from Microsoft. Want to try just IBM?

Best,
Frank
 
A

Alexander Terekhov

WW said:
Alexander said:
WW wrote:
[...]
Process exit status has really nothing to do with main() function
[that I'm talking about] return value/type.

Did you care to read the Standard?

With respect to main(), it's totally "outdated" and poorly thought out
stuff. Never wanted to reread it. ;-)

I see. That makes me wonder how do you come to criticise it. If you don't
know it.

http://dictionary.reference.com/search?q=reread

regards,
alexander.

P.S. http://groups.google.com/groups?group=sci.med.vision
 
A

Attila Feher

Alexander said:
WW said:
Alexander said:
WW wrote:
[...]
Process exit status has really nothing to do with main() function
[that I'm talking about] return value/type.

Did you care to read the Standard?

With respect to main(), it's totally "outdated" and poorly thought
out stuff. Never wanted to reread it. ;-)

I see. That makes me wonder how do you come to criticise it. If
you don't know it.

http://dictionary.reference.com/search?q=reread

OK. So you don't stutter. Big deal. ;-) (YHBT)
 
A

Alexander Terekhov

Attila Feher wrote:
[...]

Newbies, YHBT is the transliteration of the ancient Hebrew phrase meaning
'There is no God but Allah'.

regards,
alexander.
 
D

Duane Hebert

Don't bother with this guy. I've already sent him Bjarn Stroustrup's FAQ.
Besides all of the reasoning that he
gives, the first lines are:

The definition
void main() { /* ... */ }
is not and never has been C++, nor has it even been C. See the ISO C++
standard 3.6.1[2] or the ISO C standard 5.1.2.2.1. A conforming
implementation accepts
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }If Stroustrup says this, why
bother with anything further? This guy is just trolling andapparently very
successfully.
 
B

Bonzo

WW said:
A code containing void main is not compliant. It was just told to you hours
ago by the C++ spokesman of Microsoft. You need to learn to listen.

The Sage must be having the greatest laugh at everyone responding to
this thread. Everyone knows what he is saying is wrong, let it go. He's
a troll.
 
J

Josh Lessard

Quoting Bjarne from that page:
"A conforming implementation may provide more versions of main(), but
they must all have return type int."

Here's another quote from that same page, just a little further down.
Keep in mind, The_Sage, that this is from the man himself...the CREATOR
of C++:

"A conforming implementation may provide more versions of main(), but they
must all have return type int. The int returned by main() is a way for a
program to return a value to "the system" that invokes it. On systems that
doesn't provide such a facility the return value is ignored, but that
doesn't make "void main()" legal C++ or legal C. Even if your compiler
accepts "void main()" avoid it, or risk being considered ignorant by C and
C++ programmers."

I think you've gone well past the point of proving your ignorance to us C
and C++ programmers. And since you seem to be such a proponent of logic,
you can't argue this point at all. It's from the creator...the guru...if
anyone on this earth knows legal and compliant C++, it's him. He has
stated in plain English that not only are you wrong, but you're making
yourself look quite ignorant to the rest of us.

If you think you can honestly argue with the creator of the language,
then nothing you post is even worth reading (not that we didn't
already know that).

Case closed.

*****************************************************
Josh Lessard Master's Student
School of Computer Science
Faculty of Mathematics
University of Waterloo
(519)888-4567 x3400
http://www.cs.uwaterloo.ca
*****************************************************
 
T

The_Sage

Reply to article by: "WW said:
Date written: Wed, 24 Sep 2003 06:49:36 +0300
MsgID:<[email protected]>
A code containing void main is not compliant. It was just told to you hours
ago by the C++ spokesman of Microsoft. You need to learn to listen.

You need to learn to read. The spec was quoted and it clearly stated it was
okay.

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

Attila Feher

The_Sage said:
You need to learn to read. The spec was quoted and it clearly stated
it was okay.

You need to learn to read. The spec was quoted and it clearly stated it was
not okay. I quoted the specs. Then Herb quoted some specs which has proven
that if a standard conforming compiler compiles a code it does not mean that
the code is standard C++.

Herb Sutter wrote:

"Just to avoid confusion, maybe saying it this way would be clearer: The
above code is *not well-formed* standard C++ code. A conforming C++ compiler
is free to accept the code anyway, even though the standard does not
require the compiler to accept the code.

Herb"

Emphasis added by me.

Please stop posting anymore Severly Abusive Gibberish Emittions. Troll
somewhere else.
 
R

Ron Natalie

Attila Feher said:
"Just to avoid confusion, maybe saying it this way would be clearer: The
above code is *not well-formed* standard C++ code. A conforming C++ compiler
is free to accept the code anyway, even though the standard does not
require the compiler to accept the code.

And if the compiler does decide to accept ill-formed code, it still is required
to issue a "diagnostic."
 
R

Randall Hyde

WW said:
I have finally found out what the Sage abbreviation stands for: Seriously
Abnormal Gibberish Emitter.

This could be fun.

How about
"Stupid Arguments Given Everytime"?

or maybe

"Sage's Arguments Gag Everyone"?

or how about

"Say Anything, Garbage Especially"?

This could go on and on forever.... :)
Cheers,
Randy Hyde
P.S., I was tempted to use A$$hole in there, but
we don't have to drop down to that level to have
some fun with this.
 

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
474,145
Messages
2,570,826
Members
47,373
Latest member
Desiree036

Latest Threads

Top