General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only