lnLines=alines( laWords, chrtran( lcStr, ' ', chr(13) ), .t. )VFP7/8 Compatible
lnLines=alines( laWords,lcStr," ")So, to understood your texfile, I've create the followind textfile by code:
lcFile="" FOR I=1 TO 9 TEXT TO lcFile TEXTMERGE NOSHOW ADDITIVE <<REPLICATE(TRANSFORM(i),18)>><<SPACE(1)>> ENDTEXT ENDFOR ?lcFile STRTOFILE(lcFile,"test.txt")It creates a plain text file with nine number with 18 chars long separated with an space. I'm going to append this file to an cursor via FILETOSTR()+ALINES()+INSERT-SQL
create cursor temp (ccodes c(18)) lcAppend = FILETOSTR("test.txt") FOR lnCounter=1 to ALINES(laCodes,lcAppend," ") INSERT INTO temp VALUES(laCodes[lnCounter]) ENDFORBut also I can modify the original space separated file to have an enter's delimited file.
STRTOFILE(CHRTRAN(FILETOSTR("test.txt")," ",CHR(13)),"test2.txt") APPEND FROM test2.txt TYPE SDFHTH