Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many CASEs in DO CASE?
Message
De
01/06/2006 17:59:30
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01126584
Message ID:
01126621
Vues:
14
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform