Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Initializing Variable
Message
From
29/07/1998 10:00:25
 
 
To
29/07/1998 01:44:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00122209
Message ID:
00122285
Views:
19
>If the variable doesn't exist at a higher level, than it defaults to PRIVATE. If it exists at a higher level, than that variable it is used.
>
>IMHO, it's better to explicitly declare all local variables as LOCAL.
>

So that was what was confusing me.

In the VFP documentation, PRIVATE pcVariable does not initialize pcVariable. It just makes pcVariable private to that method or procedure. I didn't realize that pcVariable=whatever automatically made pcVariable private.

So how long does a PRIVATE variable exist if it remains in existance after a method or procedure has completed. And how is that different from a PUBLIC variable?

Where would you use a PRIVATE variable?

Thanks for your help.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform