Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesfiles Path: utzoo!linus!decvax!decwrl!amd!fortune!hpda!hplabs!hp-pcd!hpdsa!decot From: decot@hpdsa.UUCP (decot) Newsgroups: net.lang.c Subject: Re: Re: Re: Standardization questions -- Message-ID: <7200003@hpdsa.UUCP> Date: Sat, 27-Oct-84 07:24:00 EST Article-I.D.: hpdsa.7200003 Posted: Sat Oct 27 07:24:00 1984 Date-Received: Tue, 30-Oct-84 20:27:09 EST References: <5367@brl-tgr.UUCP> Organization: Hewlett-Packard - Cupertino, CA Lines: 16 Nf-ID: #R:brl-tgr:-536700:hpdsa:7200003:000:785 Nf-From: hpdsa!decot Oct 20 20:24:00 1984 A solution to this problem is suggested by the comment style of Ada, which is that portions of lines beginning with '--' are ignored. Since this would be rather unacceptable in C, and we want the preprocessor to handle it, the rule that leaps to mind is: Lines or portions of lines beginning with '##' are ignored, except within single or double quotes, or within the /* other kind of */ comment. This rule applies even if the remainder of the line contains '/*'. Voila! No problems with nesting, and it's always immediately obvious whether a line is commented out, if you use consistently use only ## in new programs. This also has the advantage that all existing correct sources would remain correct, which is not true under comment nesting. Dave Decot hpda!decot