Should the Pre-Processor Understand Quoted Items?

tanner at ki4pv.UUCP tanner at ki4pv.UUCP
Fri Jan 16 01:00:56 AEST 1987


 /*	the following little programme raises a few issues about
  *	the pre-processor, doesn't it?
  *	14-Jan-87  [ki4pv!tanner]
  */

 /*	the START_CMT definition below confuses the pre-processor
  *	horribly.  the solution, until the pre-processor gets fixed,
  *	is to use "\052" instead of the '*' character there.
  */
#define	 START_CMT	" /* "
#define	 ENDOF_CMT	" */ "

char
	srtc[] =	START_CMT,
	endc[] =	ENDOF_CMT;

main()
	{

	printf("comments start with %s and end with %s\n", srtc, endc);
	exit(0);

	}

-- 
<std dsclm, copies upon request>	   Tanner Andrews



More information about the Comp.lang.c mailing list