Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace All while not plStop
Message
From
26/06/2002 16:02:41
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00672137
Message ID:
00672655
Views:
8
This message has been marked as a message which has helped to the initial question of the thread.
Hi Nadya,

Well, like I was saying, I wouldn't bother with testing the speed between those 2 options...the one without the WHILE would not respond to the escape. It would stop making changes, but would continue to read every record in the file to test if it should do the replace.

IOW, my idea was a bad one, but I hit send before I noticed :)

>>Nadya,
>>
>>Well, I was going to suggest adding "and !plStop" to the FOR clause, but I think REPLACE would still continue reading records to determine if changes should be made...
>>
>
>Steve,
>
>I think your idea would work as well, but there are reasons, why I choose WHILE approach.
>
>We construct REPLACE command and then execute macro.
>
>If ForCondition is empty, we put ALL. I also think, that if we have FOR condition, we probably should put it in (), etc.
>
>So I choose the easier route. I didn't make any measurements, what is faster
REPLACE FOR (ForCond) and not plStop
>
>or
REPLACE FOR ForCond WHILE not plStop
>
>The table is table buffered. In addition validations should fire in batch mode (though I believe, I disabled them - but it's not my application, so they probably have to be re-activated).
>
>
< snip >
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform