Files
harbour-core/harbour/contrib/hbmisc/tests/readfile.prg
Viktor Szakats 81c9b0506c 2010-06-04 15:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/*
    * Deleted 'www.' from harbour-project.org website name.
      (www.harbour-project.org -> harbour-project.org)
2010-06-04 13:32:23 +00:00

28 lines
586 B
Plaintext

//
// $Id$
//
// Test program for new class that reads a file one line at a time
/* Harbour Project source code
http://harbour-project.org/
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
*/
#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