Suggestion for cpp

Dave Decot decot at cwruecmp.UUCP
Wed Feb 15 17:03:39 AEST 1984


How many zillion times have you wanted to comment out one or more C functions,
or a block of lines?  A few day's experience with the language teaches anyone
that you can't just

    #include <irxg8w0V.h>

    /*
    wow(gosh, golly, jeepers)
    int gosh, golly, jeepers;		/* snazzy parameters */
    {
	int ooh, aah;			/* amazing variables */

	ooh = _IRXG8W0_BUFQT;		/* fascinating constant */

	for (golly = 0; gosh < jeepers; ooh++) {
	    gosh *= ooh;
	    golly -= jeepers? gosh : IRXG8W0_KIZM;
	}
    */

the function because comments end at the first */.  So, why not two new cpp
commands:

    #{
	...
    #}

which cause the preprocessor to ignore everything intervening?  I realize that

    #if 0
	...
    #endif

does the same thing, but it isn't as clear.  How about it?

Dave Decot		 "Non-Americans are people, too."
decvax!cwruecmp!decot    (Decot.Case at rand-relay)



More information about the Comp.lang.c mailing list