Modula-2 also have "static" variables, but they are global within a module.
They may not be as handy as C's "static" but they're practically as good. I
don't really see any significant difference.
– Steve –
Steve,
In C, if you declare a static variable within a module (vs a
declaration within a function)…they are 'visible' to any function within that
module, but 'invisible' to any functions outside that module.
If you declare a static variable within a function, it is 'visible'
only within that function (as are all other local variables).
I know nothing about Modula-2, so don't know if this matches or doesn't
their use of static variables.
Don