??? 06/08/04 18:46 Read: times |
#72099 - RE: Weekend Puzzle Responding to: ???'s previous message |
thank you for your advise.
Seems, I have something learned today. Than today was a good day. Nevertheless I'm still the opinion, that it was more error proven, if I always see any non zero expression as true, independent, if it was returned by a compiler function or by a self written function. Furthermore it is always more fault avoiding, if every variable was not assumed that it can hold only 0 or 1. If I'm not mistaken, and somebody please correct me if I am, a logical test will always evaluate any non-zero value as TRUE. However, the only non-zero value that a boolean operator will return is 1. So you should absolutely expect any function you write to be considered TRUE if it returns any non-zero value. But the boolean operators are not going to return some random non-zero number. They can only return 0 or 1. |