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,19b6efa2ecebaed0 X-Google-Attributes: gid103376,public From: Samuel Mize Subject: Re: Ada95 Pretty-Printers Date: 1997/06/13 Message-ID: <33A157AA.1F2F3650@link.com>#1/1 X-Deja-AN: 248152144 References: <339C58A6.4D5A@sprintmail.com> <339D677D.2FAC886C@link.com> <33A02793.431C@sprintmail.com> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-06-13T00:00:00+00:00 List-Id: John G. Volan (quoting himself) wrote that Apex does this: > > if Condition > > then > > Statement; > > elsif Condition > > then > > Statement; > > else > > Statement; > > end if; > > (The "then" keywords are indented two spaces rather than aligned left.) > > > case Expression is > > when Choice => > > Statement; > > when Choice => > > Statement; > > end case; > > (The "when" clauses add a level of indent we don't want, so two levels > of indent have to be unrolled after the last Statement.) > > > Loop_Name: > > while Condition > > loop > > Statement; > > end loop Loop_Name; > > (The Loop_Name introduces an extra level of indent we don't want; and > the "loop" keyword is indented two spaces rather than aligned with the > "while".) > > > Block_Name: > > begin > > Statement; > > exception > > when Exception_Name => > > Statement; > > end Block_Name; > > (The "when" clauses add a level of indent we don't want, so two levels > of indent have to be unrolled after the last Statement; and the > Block_Name adds a whole other level of indent.) All this is in accordance with the indentation shown in the ARM, but I personally just hate it. I don't think a loop or block should be indented just because it's named. I feel that the "when" clauses are a parallel part of the structure. It makes no more sense to indent "when" or "then" than it does to indent "else." Obviously, this is all just personal opinion. But I'm glad to see a smart guy and a significant company agreeing with me :-) . Sam Mize -- -- Samuel Mize (817) 619-8622 smize@link.com "Team Ada" -- Hughes Training Inc. PO Box 6171 m/s 400, Arlington TX 76005