How to convert type double figures
CodePudding user response:
var
F: Double;
F:=StrToFloat (' 1.48539705505907 e-315 ');
CodePudding user response:
Strtofloat may not lineCodePudding user response:
procedure TForm1. Button1Click (Sender: TObject);
Var f: Double;
The begin
F:=StrToFloat (' 1.48539705505907 e-315 ');
Edit1. Text:=FloatToStr (F);
Edit2. Text:=FloatToStr (F * 2);
end;
The number within the effective range, feasible, through the Edit, can test,
CodePudding user response:
Didn't give you clear, the original data is 1566885.07 so the above said use strtofloat is no goodCodePudding user response:
If transfer from the string type, StrtoFloat first, and then assigned to a double type variables, data set component bring conversion function, AsFloat directly into a double precision,CodePudding user response:
Even on the database, and thenAdoquery. Fieldbyname (field name). Asfloat;