Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How many CASEs in DO CASE?
Message
 
 
À
01/06/2006 23:35:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
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:
01126717
Vues:
20
>I would guess execution can be slowed down (especially if it is executed many times), because there is no way for VFP to optimize, and directly jump to a specific case. It has to test every case individually. Perhaps a hierarchical search can improve speed, something like this:
>
>
>case nVar < 10
>  do case
>  case nVar = 1
>    ...
>  case nVar = 2
>    ...
>case nVar < 20
>  do case
>  case nVar = 11
>    ...
>  case nVar = 12
>    ...
>...
>
>

Thank you for your input. It makes sense. Though, I have changed my approach since my original message.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform