ITextWriter.WriteLnChar

Syntax

WriteLnChar(Value: Char);

Parameters

Value. The character that must be written.

Description

The WriteLnChar method writes characters into a text file with further cursor move to the next string.

Example

Sub UserProc;
Var
    f: IFileStream;
    TxtWriter: ITextWriter;
Begin
    f := New FileStream.Create("c:\File.txt", FileOpenMode.Create, FileShare.Exclusive);
    TxtWriter := New TextWriter.Create(f);
    TxtWriter.WriteString("Copyright:");
    TxtWriter.WriteLnChar(#169);
    TxtWriter.WriteString("Registered:");
    TxtWriter.WriteLnChar(#174);
    TxtWriter.Flush;
    Dispose f;
End Sub UserProc;

On executing the example a new text file File.txt is created. Two strings are written to the file. The character string and the character with the specified code are written to each string.

See also:

ITextWriter