>SCAN scope is suposed to be ALL by default, but maybe ALL forces going top before start scanning and maybe scan without all doesn't work if you are at EOF(). (like replace, wich does not do anything if eof() on current table).
The WHILE forces a scoping based on a continuing evaluation of the condition; once the condition is not met, the loop exists, so it implies a REST scope (ie I've positioned where I want to be, so do this as long as the condition specified is true.) If you wanted to process all all records meeting the condition, you'd
SCAN FOR !llErr, which implies an ALL scoping.
>
>Well, I always GO TOP before SCAN and always SELECT ScanningTable before ENDSCAN.
>
>>Just queer, but on the same event, the first doesn't work, but putting ALL makes all the difference. Any idea?
>>
>>
>>#1 :-
>>
>>llErr = .F.
>>SCAN WHILE !llErr
>> * Commands
>>ENDSCAN
>>
>>
>>#2 :-
>>
>>llErr = .F.
>>SCAN ALL WHILE !llErr
>> * Commands
>>ENDSCAN