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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/16/04 16:47
Read: times


 
#83265 - Volatile warning?
Responding to: ???'s previous message
Dear Andy,

A shockwave ran through my body when I saw this VOLATILE stuff. I have been using something like in this in almost all of my projects.

void foo(uchar nm)
{
    unsigned char i;
    for (i=0; i<=nm; i++)
    {
        .....................
        .....................//In this function i is used nowhere
        .....................//Except the for(...) statement above
    }
}


In situatuion like above one, I use 'i' nowhere else in function otehr than mentioned. Do I need to use "volatile" keyword for 'i'. I would like to mention that my several machines are running absolutley fine as expected. I would like to also state that I never use loops for getting delays for generating delays I always use hard timers.

Thanks & Regards,
Prahlad Purohit


List of 22 messages in thread
TopicAuthorDate
Help LCD--89C51 using KEIL            01/01/70 00:00      
   RE            01/01/70 00:00      
   Keil?            01/01/70 00:00      
      Keil App Notes            01/01/70 00:00      
   Assembler programmer learning C?            01/01/70 00:00      
   So what happened to the USB, then?            01/01/70 00:00      
   The wanted code...            01/01/70 00:00      
      code            01/01/70 00:00      
         Tips and Tricks.....Andy            01/01/70 00:00      
            volatile.            01/01/70 00:00      
               Not so volatile ?            01/01/70 00:00      
                  optimiser            01/01/70 00:00      
                     Volatile warning?            01/01/70 00:00      
                        not here            01/01/70 00:00      
                        re: volatile            01/01/70 00:00      
                           volatile            01/01/70 00:00      
      Another comment - symbolic names            01/01/70 00:00      
   c code for lcd            01/01/70 00:00      
      code            01/01/70 00:00      
         symbolic Port names            01/01/70 00:00      
   There's Gratitude for you! :-(            01/01/70 00:00      
   A better method in C            01/01/70 00:00      

Back to Subject List