F
Flash Gordon
Dennis said:Flash Gordon said:Sure.
How can something that causes compilation compilation to abort be
considered valid on that implementation?
Didn't say it was a #define.
No, but *I* said it was on a specific implementation, and one provided
by the implementation for its own use.
Only if there is a conflict. That could hapen if the symbol is defined
twice or in conflicting ways, which is true of...well..any identifier.
Whether beginning with an underscore or not.
You raised this before, and as I tried to point out that is not a
reasonable objection.
I'm talking about the IMPLEMENTATION making the code invalid, not some
other error on the code. I'm talking about the IMPLEMENTATION making the
following translation unit invalid
int _MAX_POWER;
I think it perfectly reasonable to tell a beginner (and have the answer
to a beginner test) that it they are not allowed to use names which
cannot on all implementations be used in a one line C file containing
the single definition
int nameinquestion;
By failing "yes", you're saying no one can use it for
defnition/declaration, lhs, rhs- that there is no validity for such an
identifier AT ALL.
No, by failing it I'm saying that the person being tested thinks they
are free to use the identifier which is WRONG.
And that is wrong. If you want to restrict validity
to be what should be defined by an application (keying off the
identifies beginning with _ belonging to implementation or all caps
typically referring to macros) then that should be part of the question.
Otherwise, you're just asking what's a valid identifer - regardless of
context.
Ah, but in SOME contexts it is NOT a valid identifier (i.e. where an
implementation has done something making it invalid as an identifier),
so if you ignore context the only safe assumption is that it is NOT valid.
Never said it wasn't.
If you don't think it is reasonable, why argue against it without at
least acknowledging that it is reasonable?
But it does read more into the question that what
was asked.
I disagree, and I've explained why in the context of the question it is
a reasonable interpretation. I've also explained why a beginner should
start off by being told they should not use any identifier starting with
an underscore (which would lead the student to give the answer that it
is invalid).