#include <stdio.h>
int
main(void)
{
int i;; /* XXX */
int another;
i = another = 0;
return 0;
=======Quote:}
I know that if I compile above program, my C compiler will give me an error
message, and I know that I should not give TWO ';'s after the 'int i'.
I guess that the error message "b.c:7: parse error before `int'" is due
to the facts that 'a null statement', that is, ';', is immediately
followed by another declaration "int another;", and that in my knowledge,
declarations must precede any statements in C.
But I could not explain these things to others in the view points of the
ANSI C standard, mainly because I have never read the C standard. So I beg
you to explain me the real meaning of the above error message ""b.c:7: parse
error before `int'"" in the words of ANSI C standard, or if possible,
by the words of the ANSI C draft.
Please consider my embarrassing situation. I talked to my friends that
"The one who can not catch an error in the aboce C program on sight
should not be considered as a C expert." Is there any lines that
are similar to "A statement should not be followed by a declaration"
in ANSI C standard or 'the New Testament'?
=======
Don't reply privately. My email system has some problems Now.