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 14:59
Read: times


 
#72081 - RE: Weekend Puzzle
Responding to: ???'s previous message
"But a code with the assumption that only the number "1" has the meaning "true", was wrong at all.


So please write this:

z = (a > b) ? 1 : 0; // z always only 0 or 1

instead this:

z = a > b; // wrong for further numerical analysis !"

I'm afraid this is not the case. The result of the relational operators is guaranteed to be 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