STATIC void PPStartCode( byte xxx)

Status
Not open for further replies.

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.
 

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**
 

    feiutm9898

    Points: 2
    Helpful Answer Positive Rating
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.
 

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.

That's good catch echo47, thanks for correction.
 

    feiutm9898

    Points: 2
    Helpful Answer Positive Rating
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.

If for a specific C compiler which not case sensitive, that mean STATIC is corresponding to static.

Correct me if I am wrong.
 

All (non-broken) C compilers are case sensitive with keywords such as "static".
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…