I am reading from a text file, substituting some words and then creating a new file. The code below works but the FILETOSTR function is not wrapping lines just at line feeds but on other chars too.
Is there a way to make it wrap on line feeds or indeed, a better way to read a text file line by line?
Keith
Is there a way to make it wrap on line feeds or indeed, a better way to read a text file line by line?
Code:
C=FCREATE(FILENAME,0)
M.LCTEXT = FILETOSTR('d:/studioftp/pagetemps/member.pag')
FOR I = 1 TO MEMLINES(m.LCTEXT)
L = MLINE(m.LCTEXT,I)
L=STRTRAN(L,'XXXNAME',ALLTRIM(PAGEINFO[2]))
L=L+CHR(13)+CHR(10)
W=FWRITE(C,L)
ENDFOR
CL=FCLOSE(C)
Keith