Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
12.1 and for-loops
#1
Given the code:
Code:
void f()
    {
    int i, j;
    for( i =0, j = 0; i < 10; i++, j++ ) {}
    }
does rule 12.1 'advise' (instead of 'require') I place '()' around the for-loop initializers? In other words, to what extent does this rule apply in the head of a for-loop? The precedence relied on is the precedence of the '=' operator with respect to the ',' operator.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)