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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/28/04 21:54
Read: times


 
#75056 - RE: Lookup table
Responding to: ???'s previous message
Oleg Sergeev said:
if you have so many cases to be compared, then why do you not use just a lookup table?

The only reason to use a long string of 'if' statements like that is when there is a priority order that matters. Otherwise, the code should be re-written using a 'switch' statement (which the compiler may well end up implementing as a lookup table)

http://www.8052.com/forum/read.phtml?id=75055

List of 13 messages in thread
TopicAuthorDate
LCD Help!            01/01/70 00:00      
   RE: LCD Help!            01/01/70 00:00      
   RE: LCD Help!            01/01/70 00:00      
   RE: LCD Help!            01/01/70 00:00      
   RE: LCD Help!            01/01/70 00:00      
      RE: LCD Help!            01/01/70 00:00      
         RE: LCD Help!            01/01/70 00:00      
            RE: LCD Help!            01/01/70 00:00      
   RE: LCD Help!            01/01/70 00:00      
      RE: LCD Help!            01/01/70 00:00      
      RE: LCD Help!            01/01/70 00:00      
         RE: Lookup table            01/01/70 00:00      
      Use a switch statement!            01/01/70 00:00      

Back to Subject List