| ??? 01/24/04 05:33 Read: times |
#63275 - RE: Alternate C Guidelines Responding to: ???'s previous message |
First of all it is ALWAYS best to write the code in a way that states explicitly what you intend it to do.
The other point is that FALSE is always zero. TRUE is often set as NOT FALSE so if a routine says it returns TRUE it may send back FF, or 1 or any other non-zero value. Best to write with the explicit comparison every time and keep all code the same structure. To many times if you write: if(func()) { .... You will get into trouble sometime when you use func() in more places than one and someday it gets decided to change it from 2 return values to three values. The above statement would accept maybe two of the return values when it was supposed to be just one of them. Sorry my answer is choppy.....hope it is clear. Michael Karas |



