FT Text File Management

 FT_DFCLOSE()     Close file displayed by FT_DISPFILE()
 FT_DFSETUP()     Set up parameters for FT_DISPFILE()
 FT_DISPFILE()    Browse a text file
 FT_FAPPEND()     Appends a line to the currently selected text file
 FT_FDELETE()     Deletes a line from the currently selected text file
 FT_FEOF()        Determine when end of text file is encountered
 FT_FERROR()      Return the error code for a text file operation 
 FT_FGOBOT()      Go to the last record in a text file
 FT_FGOTO()       Move record pointer to specific record in a text file
 FT_FGOTOP()      Go to the first record in a text file
 FT_FINSERT()     Inserts a line in the currently selected text file
 FT_FLASTRE()     Get the no. of records in the currently selected text file
 FT_FREADLN()     Read a line from the currently selected text file
 FT_FRECNO()      Return the current record number of a text file
 FT_FSELECT()     Select a text file workarea
 FT_FSKIP()       Move the record pointer to a new position in a text file
 FT_FUSE()        Open or close a text file for use by the FT_F* functions
 FT_FWRITELN()    Write a line to the currently selected text file

 

FT_FSKIP

FT_FSKIP()
 Move the record pointer to a new position in a text file

 Syntax

      FT_FSKIP( [ <nLines> ] ) -> NIL

 Arguments

     <nLines> is the number of lines to skip.  Defaults to 1 if
     not specified.

 Returns

     NIL

 Description

     This function moves the text file record pointer, similar to
     the CLIPPER SKIP command.

     A text file "record" is a line of text terminated by a CRLF pair.

 Examples

     // display each record of a text file
     FT_FUSE( "text.c" )
     DO WHILE ! FT_FEOF()
        ? FT_FREADLN()
        FT_FSKIP()
     ENDDO

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FRECNO() FT_FGOTOP()

FT_FGOTOP

FT_FGOTOP()
 Go to the first record in a text file

 Syntax

      FT_FGOTOP() -> NIL

 Arguments

     None

 Returns

     NIL

 Description

     This function moves the record pointer to the first record
     in the currently selected text file workarea.

     A text file "record" is a line of text terminated by a CRLF pair.

 Examples

     FT_FUSE( "text.c" )      // open text file
     DO WHILE !FT_FEOF()
        ? FT_FREADLN()        // read thru file
        FT_FSKIP()
     ENDDO
     FT_FGOTOP()              // go back to top
     ? FT_FRECNO()            // 1

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FSELECT() FT_FUSE() FT_FRECNO() FT_FGOBOT()

FT_FGOTO

FT_FGOTO()
 Move record pointer to specific record in a text file

 Syntax

      FT_FGOTO( nLine ) -> NIL

 Arguments

     <nLine> is the record number to go to.

 Returns

     NIL

 Description

     This function moves the record pointer to a specific record
     in the file in the currently selected text file workarea.  If
     the record number requested is greater than the number of records
     in the file, the record pointer will be positioned at the last
     record.

     A text file "record" is a line of text terminated by a CRLF pair.

 Examples

     // read 5th line of text from file
     FT_FUSE( "FTTEXT.C" )
     FT_FGOTO(5)
     cText := FT_FREADLN()

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FRECNO() FT_FGOTOP() FT_FREADLN()

FT_FGOBOT

FT_FGOBOT()
 Go to the last record in a text file

 Syntax

      FT_FGOBOT() -> NIL

 Arguments

     None

 Returns

     NIL

 Description

     This function moves the record pointer to the last record of the
     file in the currently selected text file workarea.

     A text file "record" is a line of text terminated by a CRLF pair.

 Examples

     // read last line
     FT_FUSE( "text.c" )
     FT_FGOBOT()
     ? FT_FREADLN()

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FSELECT() FT_FUSE() FT_FGOTOP() FT_FRECNO() FT_FREADLN()

FT_FEOF

FT_FEOF()
 Determine when end of text file is encountered

 Syntax

      FT_FEOF() -> lResult

 Arguments

     None

 Returns

     .T. if an attempt was made to skip past the last record of
     the currently selected text file, otherwise .F.

 Description

     This function is similar to the CLIPPER Eof() function.

     A text file "record" is a line of text terminated by a CRLF pair.

 Examples

     FT_FUSE( "FTTEXT.C" )

     ? FT_FEOF()        // .F.
     FT_FSKIP()
     ? FT_FEOF()        // .T.

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FUSE() FT_FSKIP()