Information générale
Catégorie:
Codage, syntaxe et commandes
>Albert,
>
>So then it sounds like simply declaring a PRIVATE anywhere earlier in the code/module hierarchy than when it will be needed should work just fine, no???
>
>Cheers,
>
>Jim N
>
>>>Static variables doesn't exist in VFP. You'll have to declare the variable elsewhere (maybe in a class property) to make it available each time the method is called.
>How do I set a 'static' variable in VF, just as I do it in C/C++?Originally the lift time of local variable is only within that procedure or function, how can I get it back as I come in afterwards?
>>
>>That wouldn't be adequate. A static variable of a class is shared across all instances of the class.
Or public. It still doesn't do the same though. A static member of a class is only visible to members of the class or subclasses. Statics are much preferable because of the protection from corruption by nonmembers of the class.
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