|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
||||
|
||||
|
Re: Why Static Variables?
The keyword here is "scope".
Scope for a global and a static in a local function is different. A static is persistant, therefore the permanent portion of the memory map is larger, more memory usage (a disadvantage). But the static could be local to a function. A global is essentially static, but the scope is precariously large. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Static Cling?? | orelinde | Electrical | 17 | 27-02-2006 17:33 |
| Static Variables | amateurrobotguy | Programming | 8 | 04-03-2005 00:40 |
| Static Electricity | JeffO | Championship Event | 5 | 19-04-2004 11:04 |
| Static on the HDPE | Al Skierkiewicz | Technical Discussion | 60 | 12-03-2003 17:52 |
| Static Electricity | archiver | 2001 | 12 | 24-06-2002 00:34 |