Jan van Oosterwijk writes:
> The rule is that an identifier must be delcared before it is used,
Its a good general style guideline. Certainly makes life less
confusing for the reader (and possibly the compiler as well). And in
some cases it is required, but this isn't true in the generality
stated above.
Identifiers don't have to be explicitly declared at all. And in some
cases, subsequent declaration is accepted as long as it "confirms the
implicit type".
And in other cases, its just not true period. For example, you can
declare a pointer component of a type where the type is declared
subsequently. (If you couldn't, it would be difficult to declare
some kinds of recursive data structures).
But for the particular case in question, its true that the code was
illegal. I gave the citations in my other post to the thread,
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|