Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many CASEs in DO CASE?
Message
 
 
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:
01126586
Vues:
23
Usually if there are so many cases it looks like either some table needs to be created or there is a problem in the logic that has to be addressed.

>Is there a limit on number of CASEs can be in a DO CASE?
>
>If your DO CASE involves a large number of CASEs (say several hundred), is it faster to do CASE on a numeric comparison or a character? For example:
>
>
>nVar = 3
>do case
>   case nVar = 1
>
>   case nVar = 2
>* and so on
>endcase
>
>* vs.
>cVar = "3"
>do case
>   case nVar = "1"
>
>   case nVar = "2"
>* and so on
>endcase
>
>
>Thank you.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform