Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!pyrltd!datcon!sar From: sar@datcon.UUCP (Simon A Reap) Newsgroups: comp.lang.c Subject: Re: defining a comment? Summary: *CAN* define comments Keywords: preprocessor,comments Message-ID: <24@datcon.UUCP> Date: 23 Sep 88 15:17:10 GMT References: <5438@techunix.BITNET> <768@proxftl.UUCP> Reply-To: sar@datcon.co.uk (Simon A Reap) Organization: Data Connection Limited, Enfield, Middlesex, UK Lines: 39 In article <768@proxftl.UUCP> bill@proxftl.UUCP (T. William Wells) writes: >In article <5438@techunix.BITNET> benny%techunix.bitnet@jade.berkeley.edu (Benny Pinkas) writes: >: Can I use the Preprocessor to define a comment? > >No. > >--- >Bill >novavax!proxftl!bill Pyramid C (at least) says "Comments? Don't just say no!' 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...' :^). Good luck, Benny! -- Enjoy, yerluvinunclesimon Opinions are mine - I don't even have a cat Reach me at sar@datcon.co.uk, or ...!mcvax!ukc!pyrltd!datcon!sar