Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!aplcomm!uunet!mcsun!hp4nl!charon!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.std.c Subject: Re: C needs reliable comments Message-ID: <2816@charon.cwi.nl> Date: 17 Jan 91 15:31:38 GMT References: <2893@cirrusl.UUCP> Sender: news@cwi.nl Lines: 25 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? Oh? I think you are being facetious. Do comments in Pascal nest *according to the standard*? I don't think so. In standard Algol-60 the only form of comment begins (or should I use past tense, 'began'?) with the keyword 'comment' and ends (ended) at the first semicolon. Pretty hard to comment out things there, too. Algol-68 uses the same token to begin and to end comments. It has three or four variants ('comment', 'co' and #) but you'll have to scan the stuff you want to comment out to be sure that there aren't occurrences of the token you choose. In fact in any language where comments nest you have to worry about comment tokens occurring inside strings, unles it has a very weird lexical structure. --Guido (I'm sure I must have missed a smiley face somewhere...)