>>>What would be the difference in using DO WHILE vs SCAN WHILE...?
>>>Is there a performance issue?
>>>
>>>Thanks in advance, M.
>>My preference is for SCAN. In addition to what has been said, I think it is slightly cleaner especially if you have both a WHILE and FOR clause.
>>
>>One thing to be aware of, however. Nested SCANs do not work as expected because of the extra SKIP at the second ENDSCAN.
>
>Huh? I've never seen anything like that.
Well, nested scans on the same table:
scan
<...some code>
scan
<more code>
endscan
endscan
For such purposes, I usually keep only the innermost scan, and the outer loop is a Do While !eof().