Hi marabu,
Ich bekomme nen Overload Fehler bei deiner Function.
Delphi-Quellcode:
function StrToBytes(s: string; fs: TFormatSettings; decimal: boolean = true): double;
var
sValue: string;
factor: integer;
begin
if decimal
then factor := 1000
else factor := 1024;
sValue := ParseStr(s, ' ');
Result := StrToFloat(sValue, fs); <-----There is no overload version of StrtoFloat
case s[1] of
'G': Result := Result * factor * factor;
'K': Result := Result * factor;
end;
end;