C declaration styles

Michael Ryan miker at wjvax.UUCP
Thu Mar 24 04:44:10 AEST 1988


In article <8695 at tut.cis.ohio-state.edu>, mdf at tut.cis.ohio-state.edu (Mark D. Freeman) writes:
> Another great idea:  make your declarations look like this...
> 
> void	foo(int x, double y)	/* DECLARATION */
> 
> [ use grep to create listings ]
> Mark D. Freeman						  (614) 262-1418

why not use the cdecl keyword , as supported by Msoft 5.0 ....
	
	void foo(int x, double y); /*only if you have prototypes */

	/* if you do prototypes or not, as well as cdecl or not */
	void cdecl foo( int x, double y) 
	{
	....
if your compiler does not support this syntax, 'cdecl', then declare 
in your software-wide #include file
	...
	#define	cdecl
	...
then you can have cross compatible software AND your grep'ed [ fgrep ]
listings. 

did you say 'D', you meant 'aDa'...
michael
-- 
====	*michael j ryan
	*{..!pyramid,..!decwrl!qubix}!wjvax!miker
	*Watkins-Johnson Co., San Jose CA : (408) 435 1400 x3079
	* above views are not necessarily those of Watkins-Johnson Co.



More information about the Comp.lang.c mailing list