[ad hominems snipped]
(Sorry Attila, I just can't resist this one.
It's just too easy
)
Here we go:
By the way folks, here is that part from the ISO Standard that you still can't
tell us what it means...
3.6.1 Main function paragraph 2:
"It shall have a return type of type int
-->BUT<--
otherwise its type is implementation-defined"
Nice try. You should be a lawyer. They're specially trained
in omitting and falsifying context. (Actually, you've
done a poor job of that anyway). Here's the *full text*
of 3.6.1 / 2 from which you 'cherry-picked' a few words out of
context in a pathetic attempt to support your indefensible
position:
<begin quote>
3.6.1 Main function
2 An implementation shall not predefine the main function.
This function shall not be overloaded. It shall have a
return type of type int, but otherwise its type is
implementation-defined. All implementations shall allow
both of the following definitions of main:
int main() { /* ... */ }
and
int main(int argc, char* argv[]) { /* ... */ }
In the latter form argc shall be the number of arguments
passed to the program from the environment in which the
program is run. If argc is nonzero these arguments shall
be supplied in argv[0] through argv[argc1] as pointers to
the initial characters of nullterminated multibyte strings
(NTMBSs) (17.3.2.1.3.2) and argv[0] shall be the pointer
to the initial character of a NTMBS that represents the
name used to invoke the program or "". The value of argc
shall be nonnegative. The value of argv[argc] shall be 0.
[Note: it is recommended that any further (optional) parameters
be added after argv. ]
<end quote>
Note that *both* of the *only* two allowed forms
have a return type of 'int'.
To help you along, I'm giving you a few clues. Here is a link to a
dictionary,
that defines what the words "but" and "otherwise" mean...
To help you along, please read a book about English syntax
and semantics.
*Immediately* following the second sentence of
clause 2 above:
"This function shall not be overloaded.",
is the sentence:
"It shall have a return type of type int, but
otherwise its type is implementation-defined."
To anyone with even a rudimentary understanding of
English, it is quite obvious that the words "it"
and "its" refer to the noun 'function' in the
preceding sentence. "its type" means "the function's
type", not "the funtion's return type".
As you have, anyone can remove or alter intended meaning
of any word(s) or phrase(s) by taking them out of context.
Lawyer 101.
and report back to us if they imply
anything other than some exceptions were to follow as used in the sentence
above.
The exceptions are about the function's type, not its
return type. If you don't know the difference:
<begin quote>
3.9 Types
1 [Note: 3.9 and the subclauses thereof impose requirements on
implementations regarding the representation of types. There
are two kinds of types: fundamental types and compound types.
Types describe objects (1.8), references (8.3.2), or functions
(8.3.5). ]
<end quote>
and...
<begin quote>
3.9.2 Compound types
1 Compound types can be constructed in the following ways:
-- arrays of objects of a given type, 8.3.4;
-- functions, which have parameters of given types and return
void or references or objects of a given type, 8.3.5;
-- pointers to void or objects or functions (including static
members of classes) of a given type, 8.3.1;
-- references to objects or functions of a given type, 8.3.2;
-- classes containing a sequence of objects of various types
(clause 9), a set of types, enumerations and functions for
manipulating these objects (9.3), and a set of restrictions
on the access to these entities (clause 11);
-- unions, which are classes capable of containing objects of
different types at different times, 9.5;
-- enumerations, which comprise a set of named constant values.
Each distinct enumeration constitutes a different enumerated
type, 7.2;
-- pointers to nonstatic class members, which identify members
of a given type within objects of a given class, 8.3.3.
<end quote>
Note how I included the full text, in context.
Please quote the dictionary for us when you do your "analysis", so we can
compare your version to reality.
The dictionary meanings of words is not the point here,
the point is that you've purposely presented the words
out of context, in an attempt to assign whatever meaning
you feel supports your position.
If you cannot understand all of what I've written and
quoted above, not only do you not understand C++, you
don't understand English.
Looking forward to more of your clueless, incompetent lying.
I look forward to you ceasing your disruption of our forum with
your ravings. So:
You're right, and everyone else (including the authors of
the ISO standard document) is wrong. I hope my saying that
makes you feel better, since 'being right' is obviously your
only agenda here (other than disrupting our forum).
Bye, now.
*PLONK*
-Mike