Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public or Private
Message
 
To
29/09/1997 23:19:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00052342
Message ID:
00052557
Views:
24
>I have been told that any variable in a program (*.prg file) is
>private unless declared as public. Is this true? Variables I make
>are always declared as private and if the above statement is true
>it would save some work making sure every variable is accounted for
>and is private. I am working inside someone elses application writing
>reports and I want to be sure.
>
>Andy
Andy,

I would suggest that you continue to declare your variables PRIVATE. This si because although the variable will be private by default, if a higher level program has created a variable of the same name you code will change the vlaue of that variable unless you specifically declare your variable PRIVATE. You see your PRIVATE declaration does nothing special to YOUR variable but it does HIDE any variables that may exist with the same name as yours.
Previous
Reply
Map
View

Click here to load this message in the networking platform