ReadDouble: Double;
The ReadDouble method reads real numbers from a text file.
Sub Main;
Var
File1: IFileInfo;
TextR: ITextReader;
d: Double;
Begin
File1:=New FileInfo.Attach("c:\New_folder\1.txt");
If File1.Exists Then
TextR:=File1.OpenTextReader;
d:=TextR.ReadDouble;
End If;
Dispose File1;
End Sub Main;
After executing the example the "d" variable contains a real number read from the 1.txt file.
See also: