Files
harbour-core/contrib/hbnf/tests/fttext.prg
Przemysław Czerpak 96ca3fe470 2014-01-21 20:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* Makefile
  * config/*
  * contrib/*
  * doc/*
  * extras/*
  * include/*
  * lib/*
  * package/*
  * src/*
  * tests/*
  * utils/*
    * removed empty lines left after removed '$' + 'Id' + '$' identifiers
2014-01-21 20:41:05 +01:00

45 lines
840 B
Plaintext

#require "hbnf"
#include "fileio.ch"
PROCEDURE Main( cFile )
hb_default( @cFile, __FILE__ )
// open a text file here
IF ft_FUse( cFile, FO_READ ) > 1
DO WHILE ! ft_FEof()
? "line " + Str( ft_FRecNo(), 2 ) + " " + ft_FReadLn()
ft_FSkip( 1 )
ENDDO
?
my_goto( 18 )
my_goto( 2 )
ft_FGoBot()
?
? "after ft_FGoBot() now in line # " + hb_ntos( ft_FRecNo() )
ft_FGoTop()
?
? "after ft_FGoTop() now in line # " + hb_ntos( ft_FRecNo() )
?
? "ft_FLastRe() = " + hb_ntos( ft_FLastRe() )
// close the file
ft_FUse()
ENDIF
RETURN
STATIC PROCEDURE my_goto( n_go )
ft_FGoto( n_go )
?
? "after ft_FGoto( " + hb_ntos( n_go ) + " )"
? "line " + hb_ntos( ft_FRecNo() ) + " is " + LTrim( ft_FReadLn() )
RETURN