Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: Comment removal Message-ID: <2072@buengc.BU.EDU> Date: 8 Feb 89 21:38:21 GMT References: <1734@dlvax2.datlog.co.uk> <3466@sdsu.UUCP> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.lang.c Organization: Boston Univ. Col. of Eng. Lines: 45 In article <3466@sdsu.UUCP> middleto@sdsu.UCSD.EDU (Tom Middleton) writes: >In article <> scm@datlog.co.uk ( Steve Mawer ) writes: > >i=1/* this is a comment */1 ; >j=1/* this is >a comment */1 ; > >I tried the above on our SUN, our ELXSI and our CELERITY. The results >were the same for all three. The second line resulted in an error which >would indicate the comment was replaced by white space of some sort. >However, the first line worked just fine and the value of i when printed >was 11.[...] Bad compiler. K&Red1 states (word-of-god-time, here... :-) on pg. 8, "Any characters between /* and */ are ignored by the compiler; they may be used freely [here's the emphasized part -ed.] ANYWHERE A BLANK OR NEWLINE CAN." I.e., any compiler that thinks a comment is zero-length whitespace is (umbrellas up, let's hear it, girls!) broke-broke-broke. Okay, I'll get a grip. The C Reference Manual appendix to K 'n' R pere only says that "comments do not nest." It's entirely likely that the guys with "Standard Conforming" tattooed on a banner under a arrow-pierced heart on their ctrl-C'ing arm have a much different idea of what sort of whitespace a comment should be allowed to be. >Don't know if this is significant at all and I don't recommend comments >inside of constants but thought it was interesting enough to mention. Mention it to the company that wrote the compiler. Considering that there were _three_ compilers that busted, either someone isn't paying attention or I'm using superseded info. My obvious conceit precludes my choosing the latter. > G O P A D R E S ! No comment. ;-> --Blair "Except for all this Boggs bull, I'm a Sox fan."