Galkov писал(а):
не врите

function Str2Double( const S: String ): Double; // я подал строку " -123" - два пробела минус 123
var I: Integer;
M, Pt: Boolean;
D: Double;
Ex: Integer;
begin
Result := 0.0;
if S = '' then Exit; // а если S=" " - 5 пробелов ?
M := FALSE;
I := 1;
if S[ 1 ] = '-' then // а у меня "-" в S[3]
begin
.....
.....
end;