Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Won't return to loop
Message
From
24/02/1997 16:02:05
 
 
To
24/02/1997 15:54:06
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00021848
Message ID:
00021851
Views:
28
>I can not get a nested if - endif routine to return
>control to parent do while - end do routine.
>Example follows:(Code was staggerd originally)
>
>DO WHILE .T.
IF EOF( )
EXIT
ENDIF
SEEK lookstor IN TEMPFLOW
IF FOUND( )
>? 'Hey, found this store'
DISPLAY FIELDS storeno, number, address, city, state, id
SKIP 1 IN 'NEWSTORE'
STORE (NEWSTORE.STORENO) to lookstor
STORE (NEWSTORE.STORENO) to AFTERlookstor
DISPLAY MEMORY LIKE look*
DISPLAY MEMORY LIKE AFTERlook*
ELSE
DO WHILE .T. && It is endless loop
IF (lookstor = AFTERlookstor)
>? 'Store not found and will be sent to Newflow'
SELECT NEWSTORE
DIMENSION Cutflow(1,5)
SCATTER FIELDS Storeno, Number, Address, City, State, Zip, District TO Cutflow
SELECT NEWFLOW
INSERT INTO NEWFLOW FROM ARRAY Cutflow
SKIP 1 IN 'NEWSTORE'
>? 'Store was sent to NEWFLOW database'
STORE (NEWSTORE.STORENO) to lookstor
ELSE

*** Missed SKIP or EXIT here?

LOOP
ENDIF
ENDDO
ENDIF
>ENDDO

You have to have conditional second loop: DO WHILE NOT EOF() or something else.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform