Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Do while problem
Message
De
03/06/2005 08:47:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
03/06/2005 01:01:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
01019676
Message ID:
01019792
Vues:
17
The reason it doesn't stop is this part:
  ...
  do while found()
    replace d1 with dd
  enddo
There is nothing to change the condition, found(), which only tells you whether the last seek() or locate was successful. Therefore, the loop will run without end.

You can check this in the debugger.

>Dear Experts
>
>The following command do nothing and curosr seems to be working for a long time.
>Please make some changes to work
>
>SELECT vou_sum
>GO top
>DO while !eof()
>	AA=date 		&& date type
>	bb=VOU_NO 	&& numueric type
>	cc=ALLTRIM(VOU_TYPE)&& character type
>	dd=d1
>	
>	SELECT VOUCHERS
>	LOCATE for date=AA and VOU_NO=bb and VOU_TYPE=cc
>	DO while FOUND()
>		REPLACE d1 WITH dd
>	ENDDO
>
>	SELECT vou_sum
>	Skip
>ENDDO
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform