C-Debug package ... (a la "context-independent macros")

Norman Diamond ndiamond at watdaisy.UUCP
Fri Feb 8 13:10:37 AEST 1985


> > >	# define macro(args)\
> > >		if (1) {\
> > >			/* macro body */\
> > >		}\
> > >		else
> > > -- P. Lee
> >
> >	macro( args )
> >	next_statment;
> > fails in this macro, and is hard to find.
> > -- K. Szabo
>
> If, hoever, one writes
> 	else;
> instead of
> 	else
> the problem goes away.
> -- J. Shapiro

Then:
    if (condition)
         macro( args );
    else
         other_stuff;
gives a syntax error!
(OK it's easier to find, but then suppose the macro changes to a function.
OK, it's still easier to find.
BUT IT'S STILL OBNOXIOUS!)
-- 

   Norman Diamond

UUCP:  {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond
CSNET: ndiamond%watdaisy at waterloo.csnet
ARPA:  ndiamond%watdaisy%waterloo.csnet at csnet-relay.arpa

"Opinions are those of the keyboard, and do not reflect on me or higher-ups."



More information about the Comp.lang.c mailing list