Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Won't return to loop
Message
De
24/02/1997 16:02:05
 
 
À
24/02/1997 15:54:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Groupes d'usagers
Divers
Thread ID:
00021848
Message ID:
00021851
Vues:
32
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform