several questions

Simen Kjaeraas simen.kjaras at gmail.com
Sun Feb 17 07:47:06 PST 2008


On Sun, 17 Feb 2008 15:32:43 +0100, Saaa <empty at needmail.com> wrote:

> Making it:
> It's a global variable that can be accessed/used only inside, the set of
> names (variables, etc) that you can see and use from the code inside the
> function, aka namespace of that function.
>
> Does it contradict with:
> A static variable inside a function (which I did not cover in my last
> post), will keep its value after the function has exited, and even when
> it's being called again.
>
> I can't tell :D

Both things are correct, only different wordings. I don't like calling  
static locals for global variables, for to me that implies them being  
available globally, which they are not. They do however share other  
features with global variables (namely retaining their value after the  
function has exited).

Capiche?


More information about the Digitalmars-d-learn mailing list