Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO CASE vs IF
Message
De
27/12/2000 19:56:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
DO CASE vs IF
Divers
Thread ID:
00457199
Message ID:
00457199
Vues:
73
Hi All:

Feeling that IF's are faster than DO CASES, thought I'd ask.

Besides code readability, do you see any problems by replacing DO CASE with IF's.?

DO CASE
..CASE x="whatever1"
.....DO something
..CASE x="whatever2"
.....DO something
.....
..CASE x="whatever24"
.....DO something
ENDCASE
RETURN

.OR.

IF x="whatever1"
..DO something
..RETURN
ENDIF

IF x="whatever2"
..DO something
..RETURN
ENDIF

.......

IF x="whatever24"
..DO something
..RETURN
ENDIF

Mal
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform