delphi7如何实现 科学计数的转换。 比如我输入2,触发之后会转换成2.000000E+00.求赐教
Posted on 2016-05-05 15:45 ╰★张志峰★╮ 阅读(763) 评论(0) 编辑 收藏 举报uses SysUtils;
function StrToExp(s: string): string;
var
f: Extended;
begin
f := StrToFloat(s);
Result := FloatToStrF(f, ffExponent, 7, 2);
end;
然后这么用:
ShowMessage(StrToExp('2'));