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

Back to Subject List

Thread Closed: Issue successfully resolved

???
01/23/04 08:51
Read: times


 
#63182 - RE: Alternate C Guidelines
Responding to: ???'s previous message
Hi,
Michael, thanks for very useful link.
Reading it, I have a question about next sentence on page 18:

if(func() == TRUE)
{ ...
must be written
if(func() != FALSE)
{ ...

Is it bad style to write just if(func()) that means "if function returns anything regadring to boolean logic"?
IMHO, it is clean, understable and has no side-effects while compiled. I have tested it with both Keil C and Visual C++; in each case, the result is the same as with if(func() != FALSE)
An idea?

Thanks,
Oleg

List of 29 messages in thread
TopicAuthorDate
MISRA C Guidelines            01/01/70 00:00      
   RE: MISRA C Guidelines            01/01/70 00:00      
      RE: Alternate C Guidelines            01/01/70 00:00      
         RE: Alternate C Guidelines            01/01/70 00:00      
         RE: Alternate C Guidelines            01/01/70 00:00      
            RE: Alternate C Guidelines            01/01/70 00:00      
      RE: MISRA C Guidelines            01/01/70 00:00      
         RE: MISRA C Guidelines            01/01/70 00:00      
            RE: MISRA C Guidelines            01/01/70 00:00      
               RE: MISRA C Guidelines            01/01/70 00:00      
            RE: MISRA C Guidelines            01/01/70 00:00      
   Hitex have a deal...            01/01/70 00:00      
      RE: Hitex have a deal...            01/01/70 00:00      
         RE: Hitex have a deal...            01/01/70 00:00      
            RE: Hitex have a deal...            01/01/70 00:00      
               RE: Hitex have a deal...            01/01/70 00:00      
                  RE: Hitex have a deal...            01/01/70 00:00      
               Not guilty, mlud            01/01/70 00:00      
                  RE: Not guilty, mlud            01/01/70 00:00      
                     RE: Not guilty, mlud            01/01/70 00:00      
                        RE: Not guilty, mlud            01/01/70 00:00      
                        RE: Not guilty, mlud            01/01/70 00:00      
                     RE: Not guilty, mlud            01/01/70 00:00      
                     RE: Not guilty, mlud            01/01/70 00:00      
                        RE: Not guilty, mlud            01/01/70 00:00      
               RE: Hitex have a deal...            01/01/70 00:00      
   Jack Ganssle on the MISRA Guidelines            01/01/70 00:00      
   RE: MISRA C Guidelines            01/01/70 00:00      
      RE: MISRA C Guidelines            01/01/70 00:00      

Back to Subject List