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.6 required=5.0 tests=BAYES_05,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!ucbcad!ucbvax!JPL-VLSI.ARPA!larry From: larry@JPL-VLSI.ARPA Newsgroups: comp.lang.ada Subject: Case & Style Message-ID: <861230233748.04d@Jpl-VLSI.ARPA> Date: Wed, 31-Dec-86 02:37:48 EST Article-I.D.: Jpl-VLSI.861230233748.04d Posted: Wed Dec 31 02:37:48 1986 Date-Received: Wed, 31-Dec-86 18:45:44 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: --Sorry about the PC message. I sent it the 5th & it only now got out! Since Ada doesn't distinguish case unless it's in a char/string literal, it's easy to write code in a way that suits you and convert it with a utility program to whatever your boss/client wants. For me upper-casing keywords was handy when learning Ada but got in the way afterward. I found indentation plus placement of keywords was all I needed to easily see program structures. (Later I got hold of an editor with an overview feature like some of the outlining word-processors. Now placing the cursor and hitting one of two escape sequences folds and unfolds a program very quickly so I can see different structural views of it.) The casing scheme I use now is based on a linguistic principle. In natural language frequently used tokens are typically short and de-emphasized because our minds need very little to discriminate and handle them. The less frequent tokens have to be longer and use various emphasis devices. I decided that I needed to focus most on data and so use all caps for type, constant, and variable references. References to executables (subprograms, tasks and entrys, block labels, exceptions, packages) use caps only for the first letter in each reference and after each underline. This is essentially what Karl VanNeste recommended in his Ada Letters article (Jan-Feb '86, "Ada Coding Standards and Conventions"). However, I don't consider this the ONE RIGHT WAY. Someone else, especially if writing programs very different from the kind I do, might need a different convention.