>function FcountAndRecSize >Lparameters tcDBF >Local handle, lnFileSize, lnReccount, lnHeaderSize, lnRecordSize, ; > lnCalculatedReccount, llHasMemo >handle=fopen(tcDBF) && Opened for read >* Read header info >lnHeaderSize = ReadBytes(handle, 8,2) >lnRecordSize = ReadBytes(handle,10,2) >lnFieldCount = (lnHeaderSize - (263+32+1))/32 >=fclose(handle) >? lnFieldCount, lnRecordSize > >function ReadBytes >Lparameters tnHandle, tnPos, tnSize, tlLR >Local lcString, lnRetValue,ix >=fseek(tnHandle, tnPos,0) && Go to Pos >lcString = fread(tnHandle, tnSize) && Read tnSize bytes >lnRetValue = 0 >For ix=0 to tnSize-1 && Convert to a number > lnRetValue = lnRetValue + asc(substr(lcString,ix+1)) * ; > iif(tlLR,256^(tnSize-1-ix),256^ix) >Endfor >Return int(lnRetValue) >Cetin