Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_fwriteln()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_FWRITELN()
 Write a line to the currently selected text file
------------------------------------------------------------------------------

 Syntax

      FT_FWRITELN( < cData >, [ < lInsert > ] ) -> NIL

 Arguments

     <cData> is a string of data to write to the file at the current
      record position.

     <lInsert> is a logical indicating whether the contents
     of the current record are to be preserved, that is, if lInsert
     evaluates to .T., the a new record is inserted at the current
     position.  The current record then is pushed down to FT_FRECNO()+1.

     If lInsert is .F. or omitted, the current record is replaced by
     cData.

 Returns

     NIL

 Description

     This function writes a line of text to the file in the currently
     selected text file workarea.  Text lines are delimited with a
     CRLF pair.  The record pointer is not moved.

     The contents of the current record are updated to reflect the new
     new line written, unless the Insert option is selected.

     Writing a null string has the effect of clearing the current line
     if in overstrike mode, else inserting a new line (same as
     FT_FINSERT()).

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

 Examples

     // write a line of text to a file
     FT_FUSE( "config.sys" )
     DO WHILE UPPER( FT_FREADLN() ) != "FILES=" .AND. !F_FEOF()
        FT_FSKIP()
     ENDDO

     FT_FWRITELN( "FILES=30", FT_FEOF() )

 Source: FTTEXT.C

 Author: Brice de Ganahl and Steve Larsen

See Also: FT_FREADLN() FT_FRECNO() FT_FINSERT() FT_FDELETE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson