Language transitions
g-frank at gumby.UUCP
g-frank at gumby.UUCP
Thu Feb 7 15:04:53 AEST 1985
> With all his talk about
> the importance of data hiding and locality, he did not include local
> statics. To get a static variable it must be global! This is significant
> lack, I use local statics regularly for internal state variables, which
> is what they are for. I also do not seem to remember any facility
> for type casting or its equivalent, very useful for general purpose
> routines and record type.
> --
Modules are intended to allow hiding of what you would call local
statics. You just make a module small enough that state information
is reasonably kept in its private global variables without violating
scoping rules. This doesn't always work, but most of the time it is
reasonable.
Any type, including user-defined ones, may be cast to by taking its
name as though it were a function call, as in
CARDINAL (myvar) or SuperType (somevar)
--
Dan Frank
"good news is just life's way of keeping you off balance."
More information about the Comp.lang.c
mailing list