Walter Meester
HoogkarspelPays-Bas
Jim,
>Static variables are usefull when subsequent calls to a routine should retain the variables previous value.
Well, I know this, BUT......
Can you describe a practical situation where we definitely need static variables? The situation in your example can be rewritten without static memvars.
Object: ParenCnt
Methods: RESET and DISPLAY COUNT
Protected / Hidden properties: snOpen, snClose
With the come of OOP in VFP we can use properties of objects which behave like static memvars.
I think that allowing static variables *can* lead to poor OOP design. I cannot think of any situation where I definitely need them.
Walter,
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement