WriteDouble(Value: Double);
Value. The real value that mast be written.
The WriteDouble method writes a real number into a text file.
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: