function safegetline lparameters handle if type('handle')#'N' or handle<0 return .f. endif lnCurPos = fseek(handle,0,1) && Save current pos lcPortion = fread(handle,65536) && read in 64K blocks lnNLPos = at(chr(13)+chr(10),lcPortion) && NL position do while lnNLPos = 0 and !feof(handle) lcPortion = lcPortion + fread(handle,65536) lnNLPos = at(chr(13)+chr(10),lcPortion) && NL position enddo if lnNLPos>0 && If NL chars encountered retline = left(lcPortion, lnNLPos-1) =fseek(handle,lnCurPos+lnNLPos+1,0) && Set position to just after NL else retline = lcPortion endif return retlineCetin