Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!decwrl!labrea!rutgers!tut.cis.ohio-state.edu!cwjcc!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.unix.wizards Subject: Re: Latest indent request Message-ID: <13240@ncoast.UUCP> Date: 11 Dec 88 16:51:42 GMT References: <17680@adm.BRL.MIL> <1748@solo3.cs.vu.nl> <9063@smoke.BRL.MIL> <810@quintus.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 59 As quoted from <810@quintus.UUCP> by ok@quintus.uucp (Richard A. O'Keefe): +--------------- | In article <9063@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: | >In article <1748@solo3.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes: | >>gaspar@almsa-1.arpa (Al Gaspar) writes: | >>\ if (test) | >>\ { | >>\ whatever; | >>\ } | >>What a DISGUSTING format! | > | >Most programmers I know that have tried vertical alignment of braces | >for a while have come to prefer that to the style in K&R. +--------------- A small comment here: "vertical alignment" can also mean: if (test) { whatever; } Which might be preferable to some people. +--------------- | (book reference deleted) | The use of braces in C is discussed on pages 111 and 117. I use the "comb" | style of layout (Ledgard's preference) because it makes sense in all the | languages I use. | | Ledgard is no more God than Henry Spencer, but I need a good reason to | disagree with either of them. +--------------- Actually, the indent format I find clearest is: if (test) { whatever; } It works in most languages I've used (including Lisp, in many cases), and shows by indent level exactly what's going on. The main problems I have with it are (1) unless you use a very short indent (like 2 spaces above), lines start wrapping or disappearing off the end of the screen rather quickly; and (2) Jove isn't quite smart enough to handle it. (On the other hand, I have a patch to enable the C-indent hook in Jove; maybe I'll find the time to get the Jove sources back onto ncoast and patch them.) If this is what the above poster was referring to, my apologies; I don't have much access to technical books, alas. ++Brandon -- Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu allberyb@skybridge.sdi.cwru.edu allbery@uunet.uu.net comp.sources.misc is moving off ncoast -- please do NOT send submissions direct Send comp.sources.misc submissions to comp-sources-misc@.