coding style, continuing education
Tom Leete
tleete@mountain.net
Mon Jan 15 16:42:00 GMT 2001
Bruce Korb wrote:
>
> Mike Stump wrote:
>
> > If people _know_ of a good way to split this down, maybe we all just
> > need a refresher course on the right way, care to elaborate?
>
> It's simple :-)
>
> Put the `then' clause into a routine, recast the expression using
> boolean algebra to reduce nesting and break it up into a series
> of `if' statements that each have a clear purpose.
>
> > if ( [[insufferable boolean expression elided]] )
> > {
Caution -- sequence points, lazy evaluation, side effects. It's not just
boolean algebra.
Tom
More information about the Gcc
mailing list