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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8b756d9a0afb052a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!atl-c05.usenetserver.com!news.usenetserver.com!newsfeed.telusplanet.net!newsfeed2.telusplanet.net!newsfeed.telus.net!nntp.abs.net!news.abs.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Quick question about Ada code formatting. References: <43F7915B.3090000@obry.net> <43F83D46.2090200@obry.net> <43F84890.7010900@obry.net> <43f871d8$0$491$9b4e6d93@newsread4.arcor-online.net> <43F872C4.50505@obry.net> From: Stephen Leake Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:aVfF/+xyEO24dTXMi7jIur6mkWo= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 22 Feb 2006 17:36:11 -0500 NNTP-Posting-Host: 66.159.65.1 X-Complaints-To: abuse@toad.net X-Trace: news.abs.net 1140647779 66.159.65.1 (Wed, 22 Feb 2006 17:36:19 EST) NNTP-Posting-Date: Wed, 22 Feb 2006 17:36:19 EST Xref: g2news1.google.com comp.lang.ada:3081 Date: 2006-02-22T17:36:11-05:00 List-Id: "Randy Brukardt" writes: > "Pascal Obry" wrote in message > news:43F872C4.50505@obry.net... >> Georg Bauhaus a �crit : >> >> > They can indicate a major block. For example in Matt's AI 302 >> > implementation, there are blank lines between many executable >> > statements. There are two blank lines between most, if not all, >> > subprograms. >> >> Between subprograms I prefer the "GNAT style" header box: >> >> ---------------------- >> -- Process_Whatever -- >> ---------------------- >> >> procedure Process_Whatever is >> ... >> >> Far clearer than 2 blank lines IMHO. > > But extremely hard to maintain. We used a style like that in the Janus/Ada > compiler, and we found that we were spending a lot of time lining up the > closing hyphens ever time the comment changed in some way. Yes. One of the projects I'm on (GWindows) also requires this style. After the first couple of days, I wrote an Emacs macro to write the comment for me. Customizable tools are essential. Just out of curiosity; has any GPS user out there written a macro like that for GPS? In general, how easy is it to write macros for GPS? > After all, the idea isn't to carry any information, but to simply to > separate the procedures. (Comments that repeat what is obviously known by > reading the source code are evil, IMHO, so I find this comment wasteful.) > Perhaps a better approach would be to include a dashed line separator > between procedures -- but that takes *three* lines, and since you never have > enough screen real estate, so it seems like a waste. Right on :). -- -- Stephe