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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e9f0eae6d714d11c X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Gnat pretty printing Date: 1998/12/15 Message-ID: <3676DF28.8C0C3C3A@pwfl.com>#1/1 X-Deja-AN: 422647968 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <74lt16$9r0@romeo.logica.co.uk> <366E9E44.AA7370C7@pwfl.com> <74on70$m9o$1@cnn.Princeton.EDU> <36714049.2C5CE298@pwfl.com> <36768419.79B1F29A@pwfl.com> <756f3f$pjn$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada Date: 1998-12-15T00:00:00+00:00 List-Id: dennison@telepath.com wrote: > > You could do what some of my anal-retentive (and english-imparied) coworkers > took to doing: line up your commas or semicolons in the parameter lists with > the parentheses! eg: > > procedure Pop > ( Item : out Element_Type > ; List : in out List_Type > ; Flag : in Boolean > ) ; > That is a style which had not occurred to me. I guess it has the advantage that each parameter starts in the same column, but it really disturbs my eye that the terminating semicolon isn't after the thing it terminates. Maybe I could get used to it, but it would take time and possibly chemical restraints. > Another advantage of this that they touted is that a parameter may be added or > deleted at the w/o having to worry about dealing with the "no comma after the > last parameter" rule. > > I was always quick to point out that they just moved the problem to the first > parameter, and that it is very un-english like. But their overly mathematical > minds just didn't care. > Well, I don't know that a formatting style is going to keep you from making syntax errors. The only excuse I can see for it is ease of reading. I'd have to agree it only shifts the problem. > What I actually prefer myself is the same as above, but with the semicolons > where you'd expect them to be. > Ahhhh, but then you've got two levels of indent! The level where the parens occur, then the level where the parameters occur. It just doesn't seem logical. But as I said earlier, I doubt we are ever going to get total agreement on formatting, but so long as it is neat we could probably tolerate the differences. I take it that for the most part, we could agree that the parameters should occur on separate lines, that the colons line up and that the "in out", "in " and " out" should all occupy the same amount of space so that the type names line up. Or would that be presumptuous of me? (Allowing for the fact that, like most style rules, there are always a few exceptions where it makes sense to do something else...) MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 Ph: 561.796.8997 Fx: 561.796.4669 ***To reply, remove "bogon" from the domain name.*** "Eagles may soar, but a weasle never gets sucked up into a jet engine." -- Author Unknown