Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I return to the top of a DO CASE?
Message
De
27/04/1998 17:01:59
 
 
À
27/04/1998 16:19:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00095239
Message ID:
00095248
Vues:
25
>>>How do I LOOP back to the top of a DO CASE while I am still
>>>in the DO CASE?
>>I don't know if I exactly understand the problem but...You do realize that the only case statement that is executed is the first one that returns .T. so if you can order the case statements so that they are in the order you want the to execute might help.
>---
>Hi Sammie
>I want to return to the top of the DO CASE like I do in the DO WHILE .T.... there I use LOOP. Is there a LOOP for DO CASE?
I guess something in the Case statement will cause you to quit processing and start over in the do case. How about putting the do case inside a do while. Just remember you will have to change the data being tested or you will continue to execute the same CASE over and over.
a quick example
SELECT costfile
DO WHILE .T.
SCATTER MEMVAR
DO CASE
CASE qty = 1
IF cost > 5.00
(dowhatever)
EXIT but NOT LOOP(got to have new test situation)
ENDIF
CASE qty = 2
IF cost > 10.00
(dowhatever)
EXIT but NOT LOOP
ENDIF
ENDCASE
SKIP
(something TO eventually RETURN .F.)
ENDDO
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform