Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.3 with respect to 0.0
#4
Besides memory usage and the fact that it would be "farer away" from flag coding history, what aspect or rule of ISO 9899:1990 or MISRA-C:2004 forbids me to typedef a double to my projects effective boolean type, with TRUE equivalent to 1.0 and FALSE equivalent to 0.0?

You said !E is evquivalent to (E == 0.0).
Does this mean that (!3.7) returns an integer with value 0 (as all comparisons AFAIK return int)?
<t></t>
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)