Re^2: Why nested comments not allowed?

Russel Dalenberg dalenber at cbnewsc.ATT.COM
Wed Feb 21 05:36:52 AEST 1990


In article <4286 at jhunix.HCF.JHU.EDU>, barrett at jhunix.HCF.JHU.EDU (Dan Barrett) writes:
> In article <13706 at cbnewsc.ATT.COM> dalenber at 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 at ihlpb.att.com

Disclaimers: These opinions are mine, all mine!



More information about the Comp.lang.c mailing list