>You are replacing while a memory variable is either T or F. So, if the memvar is .F., nothing happens. Nothing in the REPLACE is changing the value of the memvar unless you have some UDF in the command. The use of FOR and WHILE in a REPLACE does work,, it is just usually used with a logical test of some field in the record set.
>
While not myVar would be always true, if myVar = .f. So, why this condition doesn't work? From the logical point of view this condition is evaluated to .t., so it should not affect the replace command.
>>Hi everybody,
>>
>>In order to allow to stop the replacement process I use the following command:
>>
>>replace all while not m.plStop
>>
>>or
>>
>>replace for ForCondition while not m.plStop
>>
>>We just discovered, that these commands don't replace records in the whole file.
>>
>>Could you please explain me, what's wrong? And how can we interrupt the replace command?
>>
>>Thanks in advance.
If it's not broken, fix it until it is.
My Blog