Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global Variable in 2.6?
Message
 
To
02/05/2002 15:55:31
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00652016
Message ID:
00652246
Views:
33
Sunshine,

If this var is declared in the Main program it does NOT need to be public. Vars are Private by default and private vars can bee seen and used by the program that creates them and all programs called below that one. So a private var in the main prg is a global var.

The ONLY reason to have a PUBLIC var is to have it out live the prg that creates it and needing a var to outlive its creator is always a design problem. PUBLIC variables are the bane and hellfire of programming. They should NEVER be used. A PUBLIC Variable is invariably a very bad patch for a very bad program design.

Just so it is not unclear what I am saying here. PUBLIC variables should be taken out in the back yard and stripped, rubbed down with sandpaper and then burried in a fire ant hill. PUBLIC variables should be castrated and made to sing soprano in the church choir. PUBLIC variables are so ugly they need to where bags over their heads to get their mothers to love them. PUBLIC variables are singularly the most grevious sin any programmer can ever commit. PUBLIC variables are worse than GOTO.

I my feelings are clear on the issue of PUBLIC variables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform