thegame8311
Technical User
I have this problem where Fwrite is not writing the data
Code:
lnFileHandle3 = FCREATE('C:\Stats3.txt') && creating final file
PUBLIC newline3
*lnCount3 = OCCURS(',', z)*
LOCAL lnFileHandle7 && numeric file handle
lnFileHandle7 = FOPEN( "C:\Stats2.txt") && open previous file for reading
IF lnFileHandle7 = -1
&& error, could not open the file
&& do something to handle the error
RETURN
ENDIF
LOCAL lcLine && define a variable to hold each line
DO WHILE NOT FEOF( lnFileHandle7) && loop through the file
lcLine = FGETS( lnFileHandle7) && store each line in lcLine
lp1.text3.value = GETWORDCOUNT(lcLine)
FWRITE(lnFileHandle3, GETWORDCOUNT(lcLine))
ENDDO
FCLOSE(lnFileHandle3)
FCLOSE(lnFileHandle7)