ANSI prototypes, the right choice...
Sean Eric Fagan
sef at kithrup.COM
Tue Feb 12 14:14:13 AEST 1991
In article <2941 at cirrusl.UUCP> dhesi%cirrusl at oliveb.ATC.olivetti.com (Rahul Dhesi) writes:
> int myfunc PARAMS((int i, char *p));
> int myfunc (i, p)
> int i;
> char *p;
> {...}
>What's good about this style is: (a) It is compatible with both ANSI
>and non-ANSI C environments;
And
myfunc (PARAMS((char c, float f));
myfunc (c,f) char c; float f; {}
is *not* right, it is a syntax error, as much as declaring myfunc to be a
float the second time is.
--
Sean Eric Fagan | "I made the universe, but please don't blame me for it;
sef at kithrup.COM | I had a bellyache at the time."
-----------------+ -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
More information about the Comp.std.c
mailing list