Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace All while not plStop
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00672137
Message ID:
00672159
Vues:
8
>>>>I know, I can use SCAN, but I want to understand, what's wrong in this syntax. It's not obvious to me, why this command doesn't work, as I think, it should.
>>>>
>>>>I probably don't understand WHILE and FOR. If I do replace all while not m.plStop what does it exactly doing?
>>>>
>>>I would expect it to do replace until EOF is reached or m.plStop became .T.
>>
>>I would to, but it doesn't work this way. It's weird.
>>
>>Anyway, I think, your SCAN suggestion should be the way to go. It would require some code changes and, according to my tests, one replace command works faster than SCAN REPLACE ENDSCAN construction...
>
>No surprise here. REPLACE FOR/WHEN keeps the file lock for the duration of the command.

We may start doing replace command from the middle of the file. My colleague just "fixed" the problem by placing go top before doing this process.

BTW, she is not aware (yet), that it was me, who added this WHILE condition. I wanted to give users ability to stop the long command...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform