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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
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.

List of 35 messages in thread
TopicAuthorDate
Weekend Puzzle            01/01/70 00:00      
   RE: Weekend Puzzle            01/01/70 00:00      
   RE: Weekend Puzzle            01/01/70 00:00      
      RE: Weekend Puzzle            01/01/70 00:00      
      RE: Weekend Puzzle            01/01/70 00:00      
         RE: Weekend Puzzle            01/01/70 00:00      
         RE: Weekend Puzzle            01/01/70 00:00      
            RE: Weekend Puzzle            01/01/70 00:00      
               RE: Weekend Puzzle            01/01/70 00:00      
   RE: Weekend Puzzle            01/01/70 00:00      
      RE: Weekend Puzzle            01/01/70 00:00      
         RE: Weekend Puzzle            01/01/70 00:00      
            RE: Weekend Puzzle            01/01/70 00:00      
               RE: Weekend Puzzle            01/01/70 00:00      
            RE: Weekend Puzzle            01/01/70 00:00      
               RE: Weekend Puzzle            01/01/70 00:00      
            RE: Weekend Puzzle            01/01/70 00:00      
               RE: Weekend Puzzle            01/01/70 00:00      
                  RE: Weekend Puzzle            01/01/70 00:00      
                     RE: Weekend Puzzle            01/01/70 00:00      
                  RE: Weekend Puzzle            01/01/70 00:00      
                     RE: Weekend Puzzle            01/01/70 00:00      
   Understanding logic expressions !!!            01/01/70 00:00      
      RE: Understanding logic expressions !!!            01/01/70 00:00      
   RE: Weekend Puzzle            01/01/70 00:00      
      RE: Weekend Puzzle            01/01/70 00:00      
         RE: Weekend Puzzle            01/01/70 00:00      
   RE: Weekend Puzzle            01/01/70 00:00      
   My Conclusion            01/01/70 00:00      
      RE: My Conclusion            01/01/70 00:00      
   Whats the trick, Michael ?            01/01/70 00:00      
      RE: Whats the trick, Michael ?            01/01/70 00:00      
         RE: Whats the trick, Michael ?            01/01/70 00:00      
            RE: Whats the trick, Michael ?            01/01/70 00:00      
               RE: Whats the trick, Michael ?            01/01/70 00:00      

Back to Subject List