ITextWriter.WriteLnDouble

Syntax

WriteLnDouble(Value: Double);

Parameters

Value. Real number that must be written.

Description

The WriteLnDouble method writes a real number 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("Pi:");
    TxtWriter.WriteLnDouble(Math.Pi);
    TxtWriter.WriteString("Exp:");
    TxtWriter.WriteLnDouble(Math.Exp(1));
    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 first string contains the Pi mathematical constant value and the second contains the exponential value.

See also:

ITextWriter