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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/18/08 21:40
Read: times


 
#156832 - My head hurts
Responding to: ???'s previous message
That was a masterpiece of uncommented code.

When working with numeric constants larger than MAX_INT, you should add proper suffixes on the constants.

Don't write 120000, do write 120000ul if you want to perform 32-bit unsigned arithemetic, or 120000l (or better 120000L) for a long signed constant.

A huge number of your constants are larger than 32767 without any suffix specifying unsigned or long or unsigned long.

And what is "condition 1", "condition 2", ...
Are they random frequency ranges, or do they mean something?

What does a function call:
frequency_calc ( a, b, c, d, e, f);
do? 6 one-character variables. How will anyone manage to keep track of their meaning? Even if they represent six parameters received on the serial port, they must somehow have a meaning.

List of 14 messages in thread
TopicAuthorDate
serial communication            01/01/70 00:00      
   Have you tried the simulator?            01/01/70 00:00      
   Some Comments might help            01/01/70 00:00      
      what happened to indentions ???            01/01/70 00:00      
         Readability            01/01/70 00:00      
            there is a famous story            01/01/70 00:00      
   My head hurts            01/01/70 00:00      
   6 Ways to Write (& post) More Comprehensible Code            01/01/70 00:00      
      Re: 6 Ways to Write (& post) More Comprehensible            01/01/70 00:00      
   a personal opinion            01/01/70 00:00      
      Problem aided by bigger screen...            01/01/70 00:00      
         key word 'modest' I totally agree            01/01/70 00:00      
      Blank Lines: My Opinion            01/01/70 00:00      
         Avoided? Feed the wolves with him            01/01/70 00:00      

Back to Subject List