Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_Tally and other 'global' variables
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00139598
Message ID:
00140301
Views:
24
>>VFP really needs a system object.
>>
>>fox._Tally ?
>>fox._screen.autocenter = .T.
>
>Samuel,
>
>There is the VFP object and _SCREEN is an object. The system variables are not connected to any object, they are memvars. They are declared and present whether you use them or not.
>
>You are correct in feeling that global variables re not a great idea, but it is important to understand why they are not a good idea. When we declare a variable PUBLIC we state that the variable will be referred to by a routine that is above the one doing the delcaration. This indicates that some routine somewhere is referring to a variable that it (or a higher level routine) does not delcare. This causes a tight external coupling of the routines, meaning changes made to one require visiting and updating other routines. This causes maintenance problems.
>
>Using the VFP system variables in another story, since you are guarantteed that the system variables will always exist and that their names will never change.
>

Jim,

I understand the implications of creating internal coupling between procedures/methods. (Trust me, I've been cleaning up other peoples code long enough ;) ) And I try to stay clear of them. My refrence to the VPF system object is more in the vein of, If the language is going into the OO Pardigm, it should go all the way. More or less a question of taste.

And thanks for the additional reccount v _tally info.
If they have you asking the wrong questions,
they don't have to worry about the answers.
-proverbs for paranoids #3
Previous
Reply
Map
View

Click here to load this message in the networking platform