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.

keywords( static, register)

Status
Not open for further replies.

dayal

Member level 3
Joined
Aug 26, 2007
Messages
54
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,629
hi,
can anyone tell me the use of static and register keyword, and also give the example c program.

thanks
dayal
 

ama_trig

Full Member level 2
Joined
Oct 9, 2009
Messages
125
Helped
20
Reputation
40
Reaction score
13
Trophy points
1,298
Location
Where my hard drive lives!
Activity points
2,100
using register will give you access to register memory (store your variable in register) so you got a way much more faster for frequently access to it, usually compiler will choose to store type/place during its code optimization but using the keyword will override compilers code optimization. you should be looking into you compilers variable storage class

static, depends on where you use, for method-function-variable ... to say simple: I don't understand it well! :D, but what I have seen so far
for variables, if you nest it on highest access possible place, it will act like global and if nested in class type, then you are sharing it true all objects created from it,using one value others will be reference, or when in local scope, will allow local variables to retain their previous value on re-entry to block of code.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top