ITextWriter.WriteDouble

Syntax

WriteDouble(Value: Double);

Parameters

Value. The real value that mast be written.

Description

The WriteDouble method writes a real number into a text file.

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.WriteDouble(Math.Pi);
    TxtWriter.Flush;
    Dispose f;
End Sub UserProc;

On executing the example a new text file File.txt is created. The Pi mathematical constant value is written to the file.

See also:

ITextWriter