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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Why .ads as well as .adb? Date: Wed, 05 Jun 2019 20:34:49 -0700 Organization: None to speak of Message-ID: References: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="0ad8b66ef2f1a8fe8c740ae2f33d0263"; logging-data="27295"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/GxWHg6a8OKVHs9RCbpDR5" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:OzX+W6Mxjtj00PIZigOuylNaHAw= sha1:FD74BaQ869hUDrOzbxYsDXoZxjQ= Xref: reader01.eternal-september.org comp.lang.ada:56493 Date: 2019-06-05T20:34:49-07:00 List-Id: Maciej Sobczak writes: > "Randy Brukardt" writes: [...] >> And C-family code with } on separate lines is a rarity > > Not in my world. Actually, this is the only style I happen to work > with. This style is promoted by all industrial coding standards (both > C and C++ language standards examples, MISRA-C, JSF, HICPP, AUTOSAR, > ...), so I don't get the argument about "rarity". > > Actually, I don't even know where to find something different. The two most common layouts for C code are: 1. Opening "{" at the end of the line, closing "}" by itself, aligned with the beginning of the construct: if (condition) { statement; statement; } 2. Opening "{" and closing "}" on lines by themselves: if (condition) { statement; statement; } (I have my own preference, but this isn't the place to go into it.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */