home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
- From: hansm@cs.kun.nl (Hans Mulder)
- Subject: Re: The Correct Way To Write C if-Statements
- Message-ID: <BxvIyA.Co2@sci.kun.nl>
- Sender: news@sci.kun.nl (NUnet News Owner)
- Organization: University of Nijmegen, The Netherlands
- References: <1992Nov12.101654.21932@thunder.mcrcim.mcgill.edu> <1992Nov12.140710@gese.ge14.mdadv.gv.at> <3860@dozo.and.nl> <1992Nov16.175117.29633@dg-rtp.dg.com>
- Date: Tue, 17 Nov 1992 18:49:21 GMT
- Lines: 21
-
- In <1992Nov16.175117.29633@dg-rtp.dg.com> goudreau@robin.rtp.dg.com (Bob Goudreau) writes:
-
- >Actually, this isn't quite right. The K&R style is to align the
- >terminating brace with the first letter of the "if" (or "while",
- >etc.):
-
- > if (cond) {
- > ugly_statements;
- > }
-
-
- But if you format your statements that way, they're no longer ugly, ergo:
-
- if (cond) {
- beautified_statements;
- }
-
- :-)
-
- --
- Hans Mulder hansm@cs.kun.nl
-