Files
harbour-core/contrib/hbmisc/tests/readfile.prg
Viktor Szakats 3ed9fa0f45 2016-01-14 19:33 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage from copyright header. Pass 2 - semi-auto.
    * project homepage and name is described in README, amongst others
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:35:07 +01:00

22 lines
439 B
Plaintext

/* Test program for new class that reads a file one line at a time
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
*/
#require "hbmisc"
PROCEDURE Main( cFile )
LOCAL oFile := TFileRead():New( cFile )
oFile:Open()
IF oFile:Error()
? oFile:ErrorMsg( "FileRead:" )
ELSE
DO WHILE oFile:MoreToRead()
? oFile:ReadLine()
ENDDO
oFile:Close()
ENDIF
RETURN