Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/27/03 21:58
Read: times


 
#37451 - RE: What\'s wrong with this C code?
I agree with Michael: the code you show should work - provided that what you posted is actually the same as what you compiled!
eg, a simple typo like this, with optimisation, might correctly give the result you describe:
void foo(unsigned char count) 
{
   while(count--); 
   {
      /* do something here */
   }
}
I have also seen problems in earlier versions of Keil C51 with using a ++ or -- operator inside a while expression - maybe C251 has inherited/resurrected that bug?

PS
Why does my code always come out double-spaced these days?

List of 5 messages in thread
TopicAuthorDate
What's wrong with this C code?            01/01/70 00:00      
RE: What's wrong with this C code?            01/01/70 00:00      
RE: What's wrong with this C code?            01/01/70 00:00      
RE: What\'s wrong with this C code?            01/01/70 00:00      
RE: What\'s wrong with this C code?            01/01/70 00:00      

Back to Subject List