The_Sage said:
[...]
Nope. Truth is not always fact, like the Gospel Truth for
example, which is not based on facts.
By definition, truth is fact. Calling something true, like "void
main() is legal C++" does not make it truth, or a fact.
So you concede the point. At last. Unfortunately, you must
have a very short memory, because in this very same post,
you insist that it's not. Perhaps this part of the post was
written by that inner child that wants to admit the truth,
and you merely succeeded in suppressing it before
continuing with your post.
Too bad none of them have actually read the standard.
Prove it. Considering that at least one of them is on the C++
committee, it seems extremely unlikely that that is the case.
Considering that the relevant portion of the standard has
been quoted at least 4 times, it seems unlikely that *any*
of them have *not* read the appropriate part of the
standard. Are you capable of saying *anything* that is
true?
I can read where the standard says you can return other
types for main()
Maybe you are reading something other than the standard?
also, ie -- int is mandatory to include in a compiler, but
void is an optional alternate.
Thus far, you have failed to provide a reference to the
standard which shows that this is the case. On the contrary,
the standard explicitly disallows this very thing, and it has
been demonstrated to do so numerous times, yet you
ignore every single explanation. Perhaps you're illiterate,
and are incapable of reading the portion of people's posts
that explains how "must return type int" does not mean
"may return type void".
[...]
<Snipped the whining bullshit>
Oh, are you referring to the part where you accused me
of calling people names, and then I cited about 12 quotes
where you completely lost any semblance of reason and
resorted to childlike name-calling (this post being a case in
point)?
[...]
This right here proves just how illiterate you are. Let's
take a look at that statement again, and see just what it
says...
That's a very good idea.
How many versions of main() can I return according to that
article? One? Two? As many as I like? The answer is: As
many as I like.
So far, so good.
So let's see, if I have a compiler and it has two types of main,
one which returns an int and another which returns a void,
has it violated the ISO standard?
Yes.
The answer is: No, because the compiler can have as many
versions of main as it likes, just so long as one of those types
is an int.
And which part of the standard says "just so long as one of
those types is an int"? Is the the part that you scribbled into
your copy of the standard? Or was this part of the standard
revealed to you by the Great Unicorn? Funny enough,
nobody else can manage to see the part of the standard which
says this, which perhaps means it was written in invisible ink
to foil us simple-minded programmers.
Perhaps you'd like to show me the logical reasoning which
leads you to conclude that:
"they must all have" <==> "just so long as one has"
Now, let's apply your reasoning to other things in the world
and see if it makes sense. Imagine a rule that says all people
on board an airplane must be wearing their seatbelts when
the fasten seatbelt sign is illuminated. By your logic, the
following two rules are equivalent:
"When the fasten seatbelt sign is illuminated, the passengers
must all have their seatbelts securely fastened"
"When the fasten seatbelt sign is illuminated, at least one
passenger must have his/her seatbelt securely fastened"
Now, I'm pretty sure with this illustration, even a 5 year old
would be able to see the fallacy of your logic. But just to
further humiliate you, I will give one more illustration:
"In order for The Sage's brain to produce meaningful output,
all of his neurons must be functioning."
Or your version:
"In order for The Sage's brain to produce meaningful output,
just one neuron needs to be functioning."
In this case, I will grant that there is an equivalency in the two
statements, but only because "all" in this case degenerates to
"one". The same is not true for allowed forms of main().
It also doesn't make it illegal.
It doesn't need to make it illegal. The standard already does
that. The point of this claim is that there are no other
provisions which make it legal.
Haha! Who cares what other "programmers" like you
consider?
When you have to get a new job because you got fired for
ranting and raving about the legality of "void main()", perhaps
you will care very much what other programmers think of
you.
Wow! I'm really scared by that serious threat. I'm not
afraid of people who can't understand the simple english
of a standard and claim that a simple three line program
has five errors, even though those who bothered to
compile it could never get more than one. Haha! Please,
get serious! Haha!
Actually, the compiler is not required to diagnose every
error in a program. It is theoretically impossible for it to do
so. In particular, it is not generally possible for the compiler
to diagnose every program which results in undefined
behaviour. Thus, the number of diagnostics reported by
the compiler is not at all indicative of the number of errors
contained in the program. Furthermore, even if it were
possible, the number of diagnostics produced would only
be relevant if all the compilers used were 100% conforming,
and you haven't even named the one vendor that has such
a compiler (or is believed to).
Dave