Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.4 clarification
#1
Dear Misra committee,

The rule 13.4 says:
The controlling expression of a for statement shall not contain any objects of floating type.

Does it apply only to loop counter, as suggest in the text explaining the rule ( ... floating-point variables shall not be used for this purpose [loop counter] ...). or to all operand of a controlling expression ?

I mean, can we consider the following for loop as compliant ?

Code:
extern float32_t foo(void);

int32_t i;
float32_t f;

for (i=0; i 1.0 && f < 3.0) ; i++){
  ...
  f = foo()
  ...
}

Thanks, Alexandre.
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)