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,FREEMAIL_FROM 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!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Quick question about Ada code formatting. Date: Thu, 23 Feb 2006 10:49:43 +0100 Message-ID: <43FD8537.9040004@mailinator.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net j3bNUFCPdMx8mQZNGEzWdgrW+jhxeqaVMrpxmQFh/Y8tb2E0k= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:3094 Date: 2006-02-23T10:49:43+01:00 List-Id: Stephen Leake wrote: > "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? GPS already has a macro for this, you simply have to give a key binding to it. I personally use Ctrl+B and voil�, subprogram box with null effort. Otherwise I agree that it would be quite painful. >>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 :). >