Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wishlist???
Message
From
03/09/1999 10:17:15
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00260725
Message ID:
00261140
Views:
32
Jim,

>Static variables are usefull when subsequent calls to a routine should retain the variables previous value.

Well, I know this, BUT......
Can you describe a practical situation where we definitely need static variables? The situation in your example can be rewritten without static memvars.

Object: ParenCnt
Methods: RESET and DISPLAY COUNT
Protected / Hidden properties: snOpen, snClose

With the come of OOP in VFP we can use properties of objects which behave like static memvars.

I think that allowing static variables *can* lead to poor OOP design. I cannot think of any situation where I definitely need them.

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform