Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Infinite loop
#4
Hi Jon,

Looks like \"they\" said

Code:
/* deliberate infinite loop */
for ( ; ; )
{
   ...
}

was the allowed form is infinite loops. Given one way to write them, there is no need for alternatives.

I was taught Pascal back in the early 80's, and would like to write this in the following form. C99 defines a \"boolean\" type, so MISRA-C3 could be different!
Code:
/* deliberate infinite loop */
while(true)
{
   ...
}

George


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)