Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I return to the top of a DO CASE?
Message
From
27/04/1998 17:01:59
 
 
To
27/04/1998 16:19:06
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095239
Message ID:
00095248
Views:
24
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform