01-09-2008, 03:38 PM
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 ?
Thanks, Alexandre.
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>