[Gambas-user] Newbie question

Valerio Guaglianone valerioguaglianone at ...152...
Wed Sep 15 23:18:54 CEST 2004


Hi,
a newbie question:
How do i read text file?

The following code is correct?
PUBLIC SUB Button3_Click()
           DIM hFile AS File
           OPEN "error.txt" FOR READ AS #hFile
WHILE NOT Eof(hFile)
           LINE INPUT #hFile, OneLine
           TextArea1.Text=PRINT OneLine
WEND
           CLOSE #hFile
END

Thats it.

Thank :-)




More information about the User mailing list