----- Original Message -----
From: "Dave Whipp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 15, 2003 1:35 PM
Subject: Re: is static?


> Uri Guttman wrote:
> > talking about nested subs brought up another related idea, static (not
> > on the stack) lexicals inside subs.
>
> Doesn't C<our> give you this?
>

   Not really.   A variable declared with <our> can be accessed from
anywhere in the program, just by redeclaring it or calling it with the
"package::" syntax.    A variable declared with <my> can be accessed outside
its scope only if the user returns a reference to it.  A static variable
should be like a <my> variable except that it is only initialized once and
is not destroyed when it goes out of scope.

Joe Gottman


Reply via email to