Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!charyb!will From: will@kfw.COM (Will Crowder) Newsgroups: comp.lang.c Subject: Re: Nested Comments in C -- A recent experience Summary: ANSI *does* say comments don't nest Keywords: comments nest nesting comment Message-ID: <1990Mar14.162155.5358@kfw.COM> Date: 14 Mar 90 16:21:55 GMT References: <236100027@prism> <1414@amethyst.math.arizona.edu> <1523@wacsvax.OZ> <1990Mar12.164051.9400@utzoo.uucp> <90150@elsie.UUCP> Reply-To: will@charyb.UUCP (Will Crowder) Followup-To: comp.lang.c Distribution: na Organization: KFW Corporation, Newbury Park, CA Lines: 39 In article <90150@elsie.UUCP> ado@elsie.UUCP (Arthur David Olson) writes: >> ANSI C (draft of Oct 88) says...that comments do not nest. >> Detection of /* within a comment is mentioned as a "common warning"... > >The "comments do not nest" statement is in a footnote; >the /* "common warning" statement is in an appendix; >neither is part of the ANSI standard. The fact that the statement "comments do not nest" is in a footnote does indeed mean that that statement is not part of the Standard. However, the Standard does contain explicit language indicating that comments do not nest. The verbiage: Section 3.1.9 Comments: Except within a character constant, a string literal, *or a comment*, the characters /* introduce a comment. The contents of a comment are examined only to identify multibyte characters and find the characters */ that terminate it. December 7, 1988 Draft ANSI Standard for the 'C' Programming Language [emphasis added] Now I don't know about the rest of you net.folks out there, but haven't we hashed this around *quite enough* by now? Face it, comments do *not* nest in the 'C' language, never have, and probably never will. This does not introduce, in my opinion, any more problems than would allowing comments to nest. It is simply a fact of the language, and is probably not worth any more net.bandwidth. I have directed this article to comp.lang.c instead of the poster, because there are apparently quite a few folks out there who can't deal with these facts. Followups to /dev/null... >-- > Arthur David Olson ado@alw.nih.gov ADO is a trademark of Ampex. Will