Article View: comp.std.c
Article #2295Re: C needs reliable comments
From: Karl Heuer
Date: Fri, 18 Jan 1991 16:12
Date: Fri, 18 Jan 1991 16:12
22 lines
1517 bytes
1517 bytes
In article <2893@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes: >Did you realize that C is one of the few programming languages, perhaps the >only one, in which you can never be sure of correctly commenting stuff out? Nonsense. It seems to me that any language with delimited-pair comments has the same property. >(b) You can use #if 0 and #endif to comment out a block of code. Then >[it breaks] if you have an invalid token or unbalanced quotes between these I agree with Doug that this is a silly objection. But if we accept it... >[proposal for a #comment...#endc block that is basically #if 0...#endif] Objection (b) still applies. The following two lines char *s = "continued\ #endc /*"; /* the string ends with a slash-star */ are a valid C fragment, but if you comment them out, you get something which is indistinguishable from an attempt to comment out the incomplete fragment consisting only of the first line. Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint
Technical Details
Message-ID:
<1991Jan18.161256.6720@dirtydog.ima.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!linac!att!att!ima!dirtydog!karlReferences:
<2893@cirrusl.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!linac!att!att!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: Re: C needs reliable comments Message-ID: <1991Jan18.161256.6720@dirtydog.ima.isc.com> Date: 18 Jan 91 16:12:56 GMT References: <2893@cirrusl.UUCP> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Organization: Interactive Systems Lines: 22