Rudolf,
Perhaps this should be taken to the "Designs" Topic. This is a matter of a simple design of a multi-use function. This is a very common design that we use here. If you go to that topic, and look under submitted designs, you will see a very good example of this implemented in a more complex design (the design I submitted actually contains two designs. The more complex design rests on top of the multiple function design.)
Check it out and see what you think. I don't know what the scope of a static local is in C environment, but in LabVIEW, an unitialized shift register, which is a common element in this design, has global scope to the application environment. This method is also how we implement global variables. The submitted design also con
tains this sub-design element, that is, a "LabVIEW 2 Style Global" or "Un-Initialized Shift Register Global" or whatever name you prefer.
I hope this helps. It is a bit redundant, but I felt it important to mention that this is in fact a design solution. Perhaps I can garner some interest in that topic.