From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,32e9e18947de9391 X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Comments at the End of Lines Date: 1999/07/03 Message-ID: <377e3757.0@news.pacifier.com>#1/1 X-Deja-AN: 496795178 References: <7lir0r$og1$1@usenet01.srv.cis.pitt.edu> X-Trace: 3 Jul 1999 09:16:23 PST, 216.65.140.1 Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Date: 1999-07-03T00:00:00+00:00 List-Id: John Duncan wrote in message <7lir0r$og1$1@usenet01.srv.cis.pitt.edu>... >> Finally, not related to Ada, a C style guide I was asked to review had a >rule >> that said not to put comments at the end of lines. > >I'm not exactly sure, but if you consider the C example, comments on the >same line tend to be used to "explain" a very mangled semantic structure. As >far as the meaning of each line is concerned, you shouldn't need comments at >the end of the line. Consider: > >Beta := Sqrt(X); -- Assign sqrt(x) to beta > You'll have a hard time persuading me that you need comments on separate lines for the following code (declarations). pieceLength : Float; -- inches pieceArea : Float; -- square feet pieceVolume : Float; -- cubic feet SteveD