Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!orion.cf.uci.edu!paris.ics.uci.edu!nagel From: nagel@paris.ics.uci.edu (Mark Nagel) Newsgroups: comp.lang.c Subject: Re: defining a comment? Keywords: preprocessor,comments Message-ID: <745@paris.ics.uci.edu> Date: 24 Sep 88 22:39:03 GMT References: <5438@techunix.BITNET> <768@proxftl.UUCP> <24@datcon.UUCP> Reply-To: Mark NagelOrganization: University of California, Irvine - Dept of ICS Lines: 46 In article <24@datcon.UUCP> sar@datcon.co.uk (Simon A Reap) writes: | |How about... | #define ASTERISK * | #define SCOM /ASTERISK | #define ECOM ASTERISK/ | #define PUTCOMM(a) SCOM a ECOM | |Then, as sample code..... | start comment is SCOM | end comment is ECOM | comment here -> PUTCOMM(will be inside a comment) | |Which produces (at least on a Pyramid, using OSx4.0, in both the att |and ucb universes, with blanks and other detritus removed for brevity)... | start comment is /* | end comment is */ | comment here -> /* will be inside a comment */ | |I *can* see a use for this. You may just want to use the pre-processor |part of cc to produce commented output (yes, I know one should use 'm4' |for this, but 'better the devil you know...' :^). I can see all sorts of problems from this. Why in the world is everyone so hot to redefine the comment tokens? I can just see it now: SCOM Add 1 to foo foo++; ECOM and then later in development... SCOM Add 1 to foo foo++; /* foo controls the register bar */ ECOM Hmm. Why is my code blowing up? -- Mark Nagel Department of Information and Computer Science, UC Irvine nagel@ics.uci.edu (ARPA) When they ship styrofoam... {sdcsvax|ucbvax}!ucivax!nagel (UUCP) ...what do they pack it in?