|
Thank you面面爱面面, but if I wish
var
a:double;
s:string;
vADOConnection:Variant;
begin
a := 8.07;
s := formatfloat('#.################',a);//s display 8.07000000000000028
vADOConnection := CreateOleObject('ADODB.Connection');
vADOConnection.ConnectionString :='Driver={Firebird/InterBase(r) driver};pwd=masterkey;Uid=SYSDBA;database=C:\123.GDB';
try
vADOConnection.Open;
Except
end;
a := 8.07;
s := formatfloat('#.################',a);//s display 8.07
end;
The place where 8.07 is displayed also displays 8.07000000000000028, which means that even if it is wrong, it is also wrong!
I personally understand that vADOConnection.Open calls the MS library file, so the number after the effective digits is directly deleted. Is there any good way to not delete it? |
|