Richard said:
Richard Heathfield said:
jacob navia said:
int main(void or int main(int argc,char *argv[])
you'd be wrong, because the first of your examples is a parenthesis short
of a declarator.
Pedantic and unnecessary.
Pedantic? Yes. Unnecessary? I'm not convinced.
Are you sure?
Yes.
Not in comp.std.c, but here there are many good
programmers who come for help in C and generally only use one "standard"
of C.
Sure. So do I. I doubt whether I've had to touch more than a dozen or so K&R
C programs, ever. Although I've taken the trouble to learn about C99, I
don't actually use it (except insofar as I have modified my C style to make
my programs legal in C99 as well as in C90). So I, too, only use one
"standard" of C. That doesn't mean I am necessarily confused by the fact
that this newsgroup might discuss programs written in K&R C or C99.
Noting wrong with pointing out "portable" techniques of course,
but being all big & clever over too many standards can and does confuse
many people.
Ideally, there would be one standard. This isn't an ideal world. But it is
possible to deal with the fact of multiple standards without making too
much of a fuss about it. And, when I'm giving advice to someone whose name
I don't recognise (and therefore might reasonably be expected to be new to
the group), I tend to play down the whole C90 vs C99 thing - not mentioning
it unless it's relevant, and if it /is/ relevant then only mentioning the
bits I have to, in as non-polemical a way as I can manage. If everybody
were like me, this newsgroup would be a perfect place.
Not every one lives C : they use C to live.
I don't understand. <g,d&r>