Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local vs private
Message
From
11/08/2005 04:26:55
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01039725
Message ID:
01040107
Views:
22
>Hi,
>
>>>I don't use any PUBLIC variables. In my Main.prg, I create a PRIVATE var,
>
>So what's the difference between a PUBLIC var and a var declared as PRIVATE at the top level ?
>
>Regards,
>Viv

The difference among PUBLIC and Private it is this:
- PUBLIC doesn't depend on the stack scope  
- PRIVATE it depends on the stack scope
In the following case the public variable should be invisible
while READ EVENTS it is active,
but various bugs of VFP do yes that in some situation
the PUBLIC variable it is visible but that PRIVATE no.
CLEAR
PUBLIC someVar
someVar = "public"
PRIVATE someVar
someVar = "private"
? somevar
READ EVENTS
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform