Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

STATIC void PPStartCode( byte xxx)

Status
Not open for further replies.

feiutm9898

Full Member level 4
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.
 

dipal_z

Full Member level 5
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**
 

    feiutm9898

    Points: 2
    Helpful Answer Positive Rating

echo47

Advanced Member level 6
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.
 

dipal_z

Full Member level 5
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.

That's good catch echo47, thanks for correction.
 

    feiutm9898

    Points: 2
    Helpful Answer Positive Rating

feiutm9898

Full Member level 4
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.

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

Correct me if I am wrong.
 

echo47

Advanced Member level 6
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".
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top