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^2: Why nested comments not allowed? Message-ID: <13769@cbnewsc.ATT.COM> Date: 20 Feb 90 18:36:52 GMT References: <4286@jhunix.HCF.JHU.EDU> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 21 In article <4286@jhunix.HCF.JHU.EDU>, barrett@jhunix.HCF.JHU.EDU (Dan Barrett) writes: > In article <13706@cbnewsc.ATT.COM> dalenber@cbnewsc.ATT.COM (Russel Dalenberg) writes: >>And what will you do when trying to comment out code that contains the >>"end of comment" sequence? >> printf("A comment is ended with */"); > > Oh, come on... this is no problem. My kids in "Intermediate > Programming" wrote this for their FIRST assignment in C. It is easy to > construct the necessary automaton if you aren't counting nest levels, > and not hard to add the nesting. Fine, then enlighten me. Remember, that quotes have *NO* significance in comments, so you can't discard the "*/" above because it's inside quotes. Russel Dalenberg att!ihlpb!dalenber dalenber@ihlpb.att.com Disclaimers: These opinions are mine, all mine!