Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private VS Public
Message
 
To
26/03/1999 12:20:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00202443
Message ID:
00202657
Views:
13
No, their is no way of doing this. Private variables are only visible to
in the routine that they are created in any other routines directly or indirectly called by the parent. If procA creates the private cVar1, & procA calls procB & procB calls procC, then procA, procB & procC all see cVar1.
If a program is calling a form as 'do form ...' then you could create the variables just before calling the form & then the variables will die when that program finishes. Try to use properties or local vars when you can, privates are OK in moderation but public vars are generally frowned upon.

>Is there a way to initialize Private variables in a form and have them viewable to all methods on the form. I have tried initializing them in both the load and init methods but privates then are not seen in any of the other methods of that form.
>
>Any help would be appreciated.
>
>
>Thanks
Mark Achin
Independent Consultant, VFP MCP
Previous
Reply
Map
View

Click here to load this message in the networking platform