Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Static variable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00276200
Message ID:
00276438
Vues:
27
>>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?
>
>It looks like you need a workaround:
>- store the value in a global variable
>- store the value in a table

I don't suggest this is anything but a kludge and is really no different than what you suggest, Evan. One method would be to have the app declare the variable as global, have the routine increment or set the value however it does and save the variable to a memory file, memo field or table (as you suggest) when the app closes. This assumes that the value needs to be obtained the next time the app runs, if not, a global variable without any file storage is the way to go.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform