Path: utzoo!attcan!uunet!lll-winken!ames!xanth!nic.MR.NET!umn-cs!ns!ddb From: ddb@ns.UUCP (David Dyer-Bennet) Newsgroups: comp.lang.c Subject: Re: Proposal for a scientific look at C style choices Message-ID: <1066@ns.UUCP> Date: 11 Jan 89 22:32:00 GMT References: <132@mole-end.UUCP> <1045@ns.UUCP> <1057@ns.UUCP> <138@mole-end.UUCP> Reply-To: ddb@ns.UUCP (David Dyer-Bennet) Organization: Terrabit Software Lines: 34 In article <138@mole-end.UUCP> mat@mole-end.UUCP (Mark A Terribile) writes: :> :> if (((a->op == XNES_step) && (a->size <= XNES_bufsize)) || :> ((a->op == XNES_fix) && ((a->size + a->leftover) <= XNES_bufsize))) { :> /* code */ :> } :> For a more complex expression I would tend to indent blocks as indicated :> by the parenthasization of the expression. : :Indenting isn't a bad idea. But is it a good idea to use so many redundant :parens? When I put parens in, I *mean* them to be there; I *mean* that the :normal, usually correct (ok, except for bitops .vs. relops and equops) :precedence is violated; in their absence, default thinking and default :perception will do just fine. I'm slightly confused here; I believe the parens above are all copied verbatim from your example. Only the whitespace has been changed. :Do you *really* want to bury the conjuntive/disjuntive operators at the :end or in the middle of the line? Yes, definitely. For the same reason you want to put them elsewhere: more readable. I dislike leaving a line-end that looks like a statement end (not being good at parsing ";" mentally), so I try to end a continued expression line with an operator. After all, they are infix operators, so they're going to be infixed most of the time anyway; I've just gotten used to looking for them there. -- -- David Dyer-Bennet ...!{rutgers!dayton | amdahl!ems | uunet!rosevax}!umn-cs!ns!ddb ddb@Lynx.MN.Org, ...{amdahl,hpda}!bungia!viper!ddb Fidonet 1:282/341.0, (612) 721-8967 hst/2400/1200/300