ITextWriter.WriteLnInteger

Syntax

WriteLnInteger(Value: Integer);

Parameters

Value. The integer value that mast be written.

Description

The WriteLnInteger method writes an integer value 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("X:");
    TxtWriter.WriteLnInteger(Math.RandBetweenI(0100));
    TxtWriter.WriteString("Y:");
    TxtWriter.WriteLnInteger(Math.RandBetweenI(0100));
    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. Each string contains the random number.

See also:

ITextWriter