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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
03/02/12 06:08
Read: 339 times
Sweden


 
#186357 - Why loop with char for int parameter?
Responding to: Per Westermark's previous message
Interesting thing here.
You have a delay function that takes an unsigned int parameter.
You loop this unsigned int parameter using using variable "n" - an unsigned char variable.
And you loop "count" steps using an unsigned int variable "i"

Another thing to google a bit about. What are the view about using lower-case letters for a #define count 1700

You are not agreeing with the common recommendations to use capital letters in #define'd symbols, to make it instantly visible in the code that the symbol will be text/replaced during the compilation potentially resulting in code with non-obvious behaviour.

How long have you not noticed this?

List of 7 messages in thread
TopicAuthorDate
Help me      Daud Shakil      03/02/12 05:15      
   Descriptive?      Per Westermark      03/02/12 05:54      
      Delay      Per Westermark      03/02/12 06:02      
         Why loop with char for int parameter?      Per Westermark      03/02/12 06:08      
   Tips      Satish S Munot      03/02/12 05:57      
      Satish, you're not helping yourself here ...      Richard Erlacher      03/02/12 07:02      
         is this the "helping yourself" you refer to?      Erik Malund      03/02/12 07:36      

Back to Subject List