29 lines
626 B
Plaintext
29 lines
626 B
Plaintext
//
|
|
// $Id$
|
|
//
|
|
|
|
// Test program for new class that reads a file one line at a time
|
|
/* Harbour Project source code
|
|
http://www.Harbour-Project.org/
|
|
Copyright 1999 David G. Holm <dholm@jsd-llc.com>
|
|
See doc/hdr_tpl.txt, Version 1.2 or later, for licensing terms.
|
|
*/
|
|
|
|
#include "fileio.ch"
|
|
|
|
PROCEDURE Main( cFile )
|
|
LOCAL oFile := TFileRead():New( cFile )
|
|
LOCAL cNewLine := HB_OSNewLine()
|
|
|
|
oFile:Open()
|
|
IF oFile:Error()
|
|
QOUT( oFile:ErrorMsg( "FileRead: " ) )
|
|
ELSE
|
|
WHILE oFile:MoreToRead()
|
|
OUTSTD( oFile:ReadLine() )
|
|
OUTSTD( cNewLine )
|
|
END WHILE
|
|
oFile:Close()
|
|
END IF
|
|
QUIT
|