Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!motcsd!motsj1!mcdchg!att!cbnewsc!dalenber From: dalenber@cbnewsc.ATT.COM (Russel Dalenberg) Newsgroups: comp.lang.c Subject: Re: Re^4: Why nested comments not allowed? Message-ID: <13771@cbnewsc.ATT.COM> Date: 20 Feb 90 18:44:15 GMT References: <1525@wacsvax.OZ> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 23 In article <1525@wacsvax.OZ>, chris@wacsvax.OZ (chris mcdonald): > dalenber@cbnewsc.ATT.COM (Russel Dalenberg) writes: >> printf("A comment is ended with */"); > > Ho, hum, now your compiler, lexical analyser can't detect strings either? I said: how do you handle the case where the above line of legal C is commented out. If it's not commented out, there is no problem. The "usual" way to comment out such code would be: /* printf("A comment is ended with */"); */ Since quotes have *NO* significance within comments, the above comment ends with the first "*/" found; with *both* nested and non-nested comments! Russel Dalenberg att!ihlpb!dalenber dalenber@ihlpb.att.com Disclaimers: These opinions are mine, all mine!