dc_txt* problems
Posted: Thu Jul 03, 2014 8:52 am
Dear Roger,
I digged into dc_txt* functions to replace old clipper memo and text search functions. I've found out significant speed difference, but there are some troubles:
x represents nHandle
1. dc_txtfind(x) returns byte pointer (nBP) which appears to be correct
2. after that I try to extract the line with dc_txtLine(x), which starts at nBP+1 to end of line: I think this is not correct
3. after that function dc_txtLno(x) returns 1, should be in my case 13
Could you spend a minute to check. Maybe I am doing something wrong.
JAnko
PS: there is undocumented function cPrgName := dc_objfind( procname(1) ) ???
I digged into dc_txt* functions to replace old clipper memo and text search functions. I've found out significant speed difference, but there are some troubles:
x represents nHandle
1. dc_txtfind(x) returns byte pointer (nBP) which appears to be correct
2. after that I try to extract the line with dc_txtLine(x), which starts at nBP+1 to end of line: I think this is not correct
3. after that function dc_txtLno(x) returns 1, should be in my case 13
Code: Select all
nHandle:=DC_TxTOpen(arr[i])
do while !dc_txteof(nHandle)
cFile:=arr[i]
nLines:=dc_txtCount(nHandle) // correct
nSize:=dc_txtSize(nHandle) // correct
cSearch:=arrFP[k,4]
nBp:= dc_txtfind(nHandle,arrFP[k,4],.f. ) // correct
if nBp>0
cVrsta:=dc_txtLine(nHandle) // problem
nVrst:=dc_txtlNo(nHandle) // problem
if left(cvrsta,2)='//'
loop
endif
if arrFP[k,1]==arr[i] .and. arrFP[k,3]==dc_txtLno(nHandle)
loop
endif
aaDD (arrFPC ,{arrFP[k,1], arrFP[k,2],arrFP[k,4],cVrsta , dc_txtLno(nHandle), arr[i]} )
endif
dc_txtSkip(nHandle,1)
enddo
JAnko
PS: there is undocumented function cPrgName := dc_objfind( procname(1) ) ???