uses SysUtils; function StrToExp(s: string): string;var f: Extended;begin f := StrToFloat(s); Result := FloatToStrF(f, ffExponent, 7, 2);end; 然后这么用:ShowMessage(StrToExp(‘2‘));
时间: 2024-10-13 06:47:00
uses SysUtils; function StrToExp(s: string): string;var f: Extended;begin f := StrToFloat(s); Result := FloatToStrF(f, ffExponent, 7, 2);end; 然后这么用:ShowMessage(StrToExp(‘2‘));