>Sorry, I didn't get what you meant. Could you explain how "copy to" could replace a ; lcS = lcS + thisfield? inside a scan/endscan? Thanks.
>
>- Mari
Ok, it was late and here's some code I just ran.
set safe off
set talk off
close all
# define crlf chr(13)+chr(10)
fhandle=fcreate('c:\x.txt')
if fhandle<0
wait window "Cannot open file" timeout 5
return
endif
use D:\PROGRA~1\DEVSTU~1\VFP5\SAMPLES\DATA\ORDERS shared
go top
start=seconds()
lctext=''
scan
*fputs(fhandle,name+type)
lctext=lctext+(to_name+to_address)+crlf
endscan
=fclose(fhandle)
end=seconds()
totaltime=end-start
go top
start=seconds()
copy fields to_name,to_address to c:\y.txt
fhandle=fopen('c:\y.txt')
fsize=fseek(fhandle,2)
topoffile=fseek(fhandle,0)
lctext2=fread(fhandle,fsize)
=fclose(fhandle)
end=seconds()
totaltime2=end-start
fhandle=fcreate('c:\results.txt')
fputs(fhandle,version())
fputs(fhandle,' lctext method '+str(totaltime,10,4))
fputs(fhandle,' copy to method '+str(totaltime2,10,4))
fclose(fhandle)
modi comm c:\results.txt
close all
* My results on a Pentium II 300 with 64 meg ram NT workstation 4 spk3
Visual FoxPro 05.00.00.0415 for Windows
lctext method 1.1100
copy to method 0.0150
Visual FoxPro 06.00.8141.00 for Windows
lctext method 0.0310
copy to method 0.0160
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright