Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!aplcen!jhunix!barrett From: barrett@jhunix.HCF.JHU.EDU (Dan Barrett) Newsgroups: comp.lang.c Subject: Re: Re^2: Why nested comments not allowed? Message-ID: <4286@jhunix.HCF.JHU.EDU> Date: 20 Feb 90 02:34:14 GMT References: <1523@wacsvax.OZ> <13706@cbnewsc.ATT.COM> Reply-To: barrett@jhunix.UUCP (Dan Barrett) Organization: The Johns Hopkins University - HCF Lines: 22 >In article <1523@wacsvax.OZ>, chris@wacsvax.OZ (chris mcdonald) writes: >> I don't know why they are not supported but agree that they are damn >> useful. They are easy to parse in syntactically correct programs (ever >> heard of counting?) 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. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////