Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How many CASEs in DO CASE?
Message
From
01/06/2006 17:59:30
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01126584
Message ID:
01126621
Views:
22
The DO CASE with hundreds of CASEs seems a bit hard to digest. I am guessing that there is some commonality between the CASEs (many will have same code blocks). If they can be grouped, then I would try to make it hierarchical and step into the case one step at a time. Each CASE would have a method that would provide the next hierarchical step to be performed. Along the way the common code to a group can be performed. This might make it more easily understood?

Using a table to house the possiblities doesn't really make the code any easier to understand -- the hundreds of CASEs is now a table lookup with a EXESCRIPT() command. You are just trading where the code is typed. I have typically used tables (w/ Memos) if the code is to be dynamically changed/updated at run-time.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform