Declaring argument types

alan at allegra.UUCP alan at allegra.UUCP
Wed Sep 14 05:56:53 AEST 1983


Well, if we want the declaration to be given in the same format as
the definition, wouldn't it be better to say

	extern char *foo(x, p)
		int x;
		struct bar *p;

than to change the way functions are defined?  This would be more
difficult to parse, though.  You could always say

	extern char *foo(x, p)
		int x;
		struct bar *p;
	{}

to make life easier for yacc.


	Alan Driscoll
	Bell Labs, Murray Hill



More information about the Comp.lang.c mailing list