FT_FWRITELN()
Write a line to the currently selected text file
──────────────────────────────────────────────────────────────────────────────

Syntax


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

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


TRUE if successful, otherwise check ft_fError() for error code.

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