Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Value Used in Do While From Inside the Loop
Message
 
To
31/10/2001 11:48:05
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00575696
Message ID:
00575710
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
Something liike this:
> Do While Flag = 'AAA' and !EOF()
skip 1
lc=recn()
skip -1
Replace Flag with 'ZZZ'
go (lc)
> Enddo


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform