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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/27/04 20:23
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#83952 - it's just static
Responding to: ???'s previous message
Hmmm!

According to this,, a static function is visible only to other functions in the same file. Of course, I would assume that you wouldn't put the function declaration in a header file, because then it could be used by functions outside the scope of the file.

In other words, it's a way of hiding the functions from the outside world. PC-LINT probably noticed that the functions were never used outside of their file and demanded the static modifier.

Does PC-LINT complain about globals declared in a file not being declared as static? I do this a lot -- it's kind of like making a class' private member variables, if one considers the file to be the "class" and the non-static functions to be public methods.

-a

List of 14 messages in thread
TopicAuthorDate
Writing/Reading EEprom            01/01/70 00:00      
   8051            01/01/70 00:00      
      Didn't search first (again)            01/01/70 00:00      
         what a funny guy you are..            01/01/70 00:00      
   EEPROM read/write            01/01/70 00:00      
      internal            01/01/70 00:00      
         More details?            01/01/70 00:00      
            8051            01/01/70 00:00      
               Xmas gift            01/01/70 00:00      
                  functions declared as static            01/01/70 00:00      
                     PC-LINT            01/01/70 00:00      
                        it's just static            01/01/70 00:00      
         Writing to internal eeprom            01/01/70 00:00      
            EEprom            01/01/70 00:00      

Back to Subject List