Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Value Used in Do While From Inside the Loop
Message
De
31/10/2001 12:28:32
 
 
À
31/10/2001 11:48:05
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00575696
Message ID:
00575735
Vues:
24
This message has been marked as the solution to the initial question of the thread.
>MyTable has 100 records. There are multiple records where "AAA" is the value in the Flag field. When the value of Flag is changed to "ZZZ" in the code the loop is terminated though there are more "AAA" records to be changed. I understand this as the record pointer is moving with the changed record within the order, but how can I program around it without doing "Replace For" against the table? Thanks!
>
>
>Use MyTable excl
>Index on Flag Tag Flag
>If Seek('AAA')
>	Do While Flag = 'AAA' and !EOF()
>		Replace Flag with 'ZZZ'
>		Skip
>	Enddo
>Endif
>
>
>Regards, Renoir

How about something like
DO WHILE SEEK("AAA")
     REPLACE Flag WITH "ZZZ"
ENDDO
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform