Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!decvax!ima!cfisun!lakart!dg From: dg@lakart.UUCP (David Goodenough) Newsgroups: comp.lang.c Subject: Re: A brace vs. indentation hypothesis Message-ID: <393@lakart.UUCP> Date: 18 Jan 89 16:22:35 GMT References: <1913@buengc.BU.EDU> Organization: Lakart Corporation, Newton, MA Lines: 40 bph@buengc.BU.EDU (Blair P. Houghton) sez: > Try this: > > if (condition && much longer > conditional expression sequence > than is really excusable, with strange arrangement ef- > fects) > action(); > { > volatile gas; > > fprintf(stdmess,"Don't light that match!"); > explode(gas); > } if (condition && much longer conditional expression sequence than is really excusable, with strange arrangement effects) action(); { volatile gas; fprintf(stdmess,"Don't light that match!"); explode(gas); } Rather obvious now, isn't it. I ALWAYS place continuation lines four indent levels (i.e. 16 characters) to the right, as opposed to structure indent (one level - 4 characters) And before you complain about huge tests in conditionals, it has usually been my experience that if there _IS_ a huge test in a conditional it can be removed by a rewrite, and said rewrite generally winds up improving something else into the bargain. But then I think funny for a programmer. :-) -- dg@lakart.UUCP - David Goodenough +---+ IHS | +-+-+ ....... !harvard!xait!lakart!dg +-+-+ | AKA: dg%lakart.uucp@xait.xerox.com +---+