Files
harbour-core/tests/fileio2.prg
vszakats 9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00

28 lines
454 B
Plaintext

// Testing Harbour file io features
// using FReadStr() instead of FRead()
PROCEDURE Main()
LOCAL h
LOCAL cstr := " "
h := FCreate( "test.txt" )
? "create handle", h
FWrite( h, "This test worked if you can see this" )
FClose( h )
h := FOpen( "test.txt" )
? "open handle", h
?
/* try to read what is there */
DO WHILE Asc( cstr ) != 0
cstr := FReadStr( h, 1 )
?? cstr
ENDDO
FClose( h )
RETURN