Initiallizing local variables

Resetting the value may or may not be what you want; it isn't clear to me from your post.
Does the "static" keyword answer any of your questions?