Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Coding Paradox!

On Fri, 17 Jun 2005 08:42:48 +0200, Subash <subas.mahapatra@xxxxxxxxx> wrote:

So my paradox relates to Coding Standards which states
"There should be a one-line-gap between two 'If' statements & no-gap-at-all
inside the 'If' statement.

Then how will I write a nested IF statement??


        If(condition)
        If(condition)
           LogicLine1
           LogicLine2
   (Wrong cus of One-line-gap rule & right for no-gap-at-all rule)

No, correct, because the line between the two "if(condition)"-lines is not between "if" *statements*. The outer if-statement ends at exctly the same place as the
inner one.

However, a contradiction with the rules would be:

  if(condition) {
    if(condition)
      foo;
    // space here?
    if(condition)
      bar;
  }

The comment line is both between "if" statements and inside an "if" statement.

/L
--
Lasse R. Nielsen - atwork@xxxxxxxxxx
 'Faith without judgement merely degrades the spirit divine'



Back to the top