Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Scope of 'static' variables
Message-ID: <1990Nov26.173219.18682@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <7744.27500de8@jetson.uh.edu>
Date: Mon, 26 Nov 90 17:32:19 GMT

In article <7744.27500de8@jetson.uh.edu> elee6i5@jetson.uh.edu writes:
>But how is 'scope' preserved for such static variables 
>declared inside a function ?

Easily.  The compiler compiles code exactly as if you had declared the
variable outside the function.  The only thing it does differently is
to keep an eye on where you are using the variable, and forbid use of
it outside that function.
-- 
"I'm not sure it's possible            | Henry Spencer at U of Toronto Zoology
to explain how X works."               |  henry@zoo.toronto.edu   utzoo!henry
