Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Static variable
Message
From
14/10/1999 13:02:50
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00276200
Message ID:
00276438
Views:
28
>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform