Xref: utzoo comp.lang.c:14707 comp.unix.wizards:13435 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!cornell!batcomputer!sun.soe.clarkson.edu!nelson From: nelson@sun.soe.clarkson.edu (Russ Nelson) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: Coding Standards (was Re: Indentation...) Message-ID: Date: 13 Dec 88 18:54:33 GMT References: <3229@ingr.UUCP> <2802@hound.UUCP> Sender: news@sun.soe.clarkson.edu Reply-To: nelson@clutx.clarkson.edu Organization: Clarkson University, Postdam NY Lines: 31 In-reply-to: rkl1@hound.UUCP's message of 12 Dec 88 18:15:54 GMT In article <2802@hound.UUCP> rkl1@hound.UUCP (K.LAUX) writes: So, if you don't have a Coding Standards document to spell things out, create one and get it approved. I never said it was *required* for everyone to like/agree with it - just to follow it. I am the poster who started the whole ball of was [rolling | melting] again. I got quite a few responses both by mail and by follow-ups to my query, in which I asked if there exist any standards for indentation. Several people pointed out that K&R use a consistent indentation in their books, and also that cb and indent will impose a consistent indentation. Curiously, I didn't hear that people actually *use* K&R or cb formatting. The general advice that I got was to, when modifying existing code, stick to the existing style, and when creating new code, use a consistent style. I also realize that the question that I meant to ask was larger than just indentation -- it also covers comment style, whitespace, brace positioning, etc. So, to come to my rescue (?) is an article by Ken Arnold his C Advisor column in Unix Review Vol. 6 No. 12 on "Stylistic Stuff". I was hoping to find out that there are only a few styles in use, so that a user could become familiar with them all and use whichever was appropriate (as above). -- --russ (nelson@clutx [.bitnet | .clarkson.edu]) To surrender is to remain in the hands of barbarians for the rest of my life. To fight is to leave my bones exposed in the desert waste.