Dec 16, 2005 #1 F feiutm9898 Full Member level 4 Joined May 31, 2004 Messages 224 Helped 4 Reputation 8 Reaction score 0 Trophy points 1,296 Location Singapore Activity points 2,027 Hi. During I study the source code which is C programing mixing assembly language. I found: STATIC void PPStartCode( byte xxx) Can anyone tell me what is the meaning of STATIC for embbeded C programming. Thanks.
Hi. During I study the source code which is C programing mixing assembly language. I found: STATIC void PPStartCode( byte xxx) Can anyone tell me what is the meaning of STATIC for embbeded C programming. Thanks.
Dec 16, 2005 #2 dipal_z Full Member level 5 Joined Apr 21, 2005 Messages 278 Helped 37 Reputation 74 Reaction score 7 Trophy points 1,298 Location India Activity points 3,008 Functions with the static clause are local to the module/file. You can't call these functions from any other c file expect the one which defines it. This helps us to prevent calling this function accidentally because if you do that compiler will give you a warning/error depending on implementation. Check out this link for clear understanding with example **broken link removed**
Functions with the static clause are local to the module/file. You can't call these functions from any other c file expect the one which defines it. This helps us to prevent calling this function accidentally because if you do that compiler will give you a warning/error depending on implementation. Check out this link for clear understanding with example **broken link removed**
Dec 16, 2005 #3 E echo47 Advanced Member level 6 Joined Apr 7, 2002 Messages 3,933 Helped 638 Reputation 1,274 Reaction score 90 Trophy points 1,328 Location USA Activity points 33,176 That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it.
That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it.
Dec 16, 2005 #4 dipal_z Full Member level 5 Joined Apr 21, 2005 Messages 278 Helped 37 Reputation 74 Reaction score 7 Trophy points 1,298 Location India Activity points 3,008 echo47 said: That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it. Click to expand... That's good catch echo47, thanks for correction.
echo47 said: That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it. Click to expand... That's good catch echo47, thanks for correction.
Dec 18, 2005 #5 F feiutm9898 Full Member level 4 Joined May 31, 2004 Messages 224 Helped 4 Reputation 8 Reaction score 0 Trophy points 1,296 Location Singapore Activity points 2,027 echo47 said: That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it. Click to expand... If for a specific C compiler which not case sensitive, that mean STATIC is corresponding to static. Correct me if I am wrong.
echo47 said: That's true for static, but there's no such thing as STATIC in standard C. It's probably defined in some special header file. Go search for it. Click to expand... If for a specific C compiler which not case sensitive, that mean STATIC is corresponding to static. Correct me if I am wrong.
Dec 18, 2005 #6 E echo47 Advanced Member level 6 Joined Apr 7, 2002 Messages 3,933 Helped 638 Reputation 1,274 Reaction score 90 Trophy points 1,328 Location USA Activity points 33,176 All (non-broken) C compilers are case sensitive with keywords such as "static".