Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!luth!sunic!tut!santra!hemuli.tik.vtt.fi!Markku.Savela From: Markku.Savela@tel.vtt.fi (Markku Savela) Newsgroups: comp.lang.c Subject: Re: if (e1) return e2; [else] s1; Message-ID: <4621@hemuli.tik.vtt.fi> Date: 27 Mar 90 06:25:38 GMT References: <887@dino.cs.iastate.edu> <7990006@hpopd.HP.COM> <1990Mar25.222115.7161@caen.engin.umich.edu> Sender: news@hemuli.tik.vtt.fi Reply-To: savela@tel.vtt.fi (Markku Savela) Organization: Technical Research Centre of Finland Lines: 32 In-reply-to: chrisl@caen.engin.umich.edu's message of 25 Mar 90 22:21:00 GMT In article <1990Mar25.222115.7161@caen.engin.umich.edu> chrisl@caen.engin.umich.edu (Chris Lang) writes: >That reminds me to ask, what about this, which is basically my style? Well, I have been using about the same style, except I indent braces half way between code indenting points. (Chris example reformatted): void foo(struct spam *bar) { if (bar->bletch != NULL) printf("Ve haf a bletch!\n"); else { bar->bletch = 6; printf("We have one NOW!\n"); } return; } And, as I uses emacs, I don't have to ident myself, emacs C mode does most of the work, also catches any any unbalanced braces or parethesis very easy (when you hit and don't end up where you expect, it's time to start looking the missing brace or parenthesis ;) I don't use braces unless needed, because with this style it's very hard to make mistake (with editor C mode helping...) -- Markku Savela | savela@tel.vtt.fi Technical Research Centre of Finland | Telecommunications Laboratory | Markku.Savela@vtt.fi Otakaari 7 B, SF-02150 ESPOO, Finland | savela%vtttel@router.funet.fi