Shiny Language Reference

Language Reference > File Functions


fwriteline

bool fwriteline(file FileVar, string Source);

 

 

Writes a line to a file

The FWRITELINE statement writes a single line to a file previously opened by FOPEN. The line is terminated with a linefeed. If the opened file already exists, to append to the file you must seek to the end of it first.

 

Parameters

FileVar

A variable declared as type FILE which has previously been associated with a file by using FOPEN.

Source

The string to write to the file. A linefeed will be automatically appended to the line.

 

Return Value

TRUE if writing suceeded, otherwise FALSE.

 

Example Code

file myfile;

if(fopen(myfile, "C:\\Readme.txt") == TRUE)
{
    fwriteline(myfile, "This is a new line in the file");
}