Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: C help please - C newbie



Mark A. Odell <[EMAIL PROTECTED]> wrote:
> "Bryan Bullard" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]: 

> >> Static variables are local to the .c file.  Static variables also can
> >> stay around after the function is exited.
> > 
> > static variables have file level scope and typically presist throughout
> > operation.

> Why typically? I believe the *must* persist for the duration of the
> program. 

Not if the compiler can determine that they're no longer needed after
some point in program flow.  They must behave *as if* they persisted
for the duration of the program --- but if the program doesn't look,
the compiler is allowed to re-use the space otherwise.

-- 
Hans-Bernhard Broeker ([EMAIL PROTECTED])
Even if all the snow were burnt, ashes would remain.



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.