#define escape newline

tps at sdchem.UUCP tps at sdchem.UUCP
Sat Mar 14 20:30:09 AEST 1987


I always define my functions according to the Indian Hill style sheet; that is,
with the type on one line, and the function identifier on a separate one, as in

struct foo *
func( arg )
{
	...
}

The major advantage of this layout is that the definition is easy to find in
the text editor ( /^func/ ).

Now recently I had the (I thought brilliant) notion to do the same thing with
macro function definitions.  Like this:

# define \
Func( arg )	...

Only now my compiler says

	illegal macro name
	missing endif

Which is broken, my usage or my compiler?

Is this yet another subtlety the ANSI committee has to worry about?

|| Tom Stockfisch, UCSD Chemistry	tps%chem at sdcsvax.UCSD



More information about the Comp.lang.c mailing list