This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: coding style, continuing education


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]] )
>           {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]