Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local vs private
Message
From
09/08/2005 19:32:38
 
 
To
09/08/2005 19:17:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01039725
Message ID:
01039728
Views:
21
PRIVATE is **NOT** a means of converting public variables to local ones.

PRIVATE, as you note, does NOT create a variable, but rather tells VFP to "hide" any such-named variables from the time the PRIVATE statement "executes" until the routine in which it is declared terminates.

This then allows you to create a (new) variable with the same name that can/will be used both in the routine and in any functions or procedures called from that routine INCLUDING any that called routines may call.

Hope this helps



>Can someone give me a simple but clear understanding of the difference between LOCAL and PRIVATE? I've read the docs but they leave me unsatisfied. I understand that LOCAL actually creates a variable whereas PRIVATE does not. So is PRIVATE just a means to convert a public variable into a local one?
>
>Also LPARAMETERS vs PARAMETERS? One is LOCAL and the other is PRIVATE? I don't see the difference. Also, aren't variables created as LOCAL or PRIVATE by default without specifying? If so, what's the point?
>
>Thanks for any insights in this.
>
>- Don
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform