Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!sdd.hp.com!ucsd!ucbvax!CAS.BITNET!lwv27 From: lwv27@CAS.BITNET Newsgroups: comp.lang.c Subject: C, embedded comments and preprocessors Message-ID: <9009191929.AA13849@lilac.berkeley.edu> Date: 19 Sep 90 19:26:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 38 I have not been able to afford a copy of the new ANSI std for c, and perhaps it clarifies the situation. I have for some time commented out portions of code by surrounding them by a construct similar to: /* lines of text lines of code /* line comment */ lines of various text's comments lines of code /* line comment */ */ Today, I found a case where a third party vendor's preprocessor turned off its idea that it was in a comment. It did not however complain about it until it ran into a line like: lines of various text's comments at which time it complained that I had started but didnt finish up a character constant. Is it common for a preprocessor to disallow embedded comments? I am not looking for a debate over style, better techniques of how to do this, etc. I am just trying to decide if this is a unique occurance, fairly common, a required behavior by ANSI C stds now, etc. I do not want to contribute to flame wars on technologically religious issues ;-[) -- Larry W. Virden Business: UUCP: osu-cis!chemabs!lwv27 INET: lwv27%cas.BITNET@CUNYVM.CUNY.Edu Personal: 674 Falls Place, Reynoldsburg,OH 43068-1614 Proline: lvirden@pro-tcc.cts.com America Online: lvirden CIS: [75046,606]