mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-02 03:06:39 +02:00
* fpc_val_real_shortstr: some more minor/style cleanup.
git-svn-id: trunk@25548 -
This commit is contained in:
parent
2afea8fc19
commit
5ec95691c0
@ -1583,14 +1583,13 @@ begin
|
||||
begin
|
||||
inc(code);
|
||||
if Length(s) >= code then
|
||||
if s[code]='+' then
|
||||
inc(code)
|
||||
else
|
||||
if s[code]='-' then
|
||||
begin
|
||||
esign:=-1;
|
||||
inc(code);
|
||||
end;
|
||||
case s[code] of
|
||||
'+': inc(code);
|
||||
'-': begin
|
||||
esign:=-1;
|
||||
inc(code);
|
||||
end;
|
||||
end;
|
||||
expstart:=code;
|
||||
while (length(s)>=code) and (s[code] in ['0'..'9']) do
|
||||
begin
|
||||
@ -1605,17 +1604,13 @@ begin
|
||||
exit;
|
||||
|
||||
{ adjust exponent based on decimal point }
|
||||
if esign>0 then
|
||||
dec(exponent,decpoint*esign);
|
||||
if (exponent<0) then
|
||||
begin
|
||||
dec(exponent,decpoint);
|
||||
if (exponent<0) then
|
||||
begin
|
||||
esign:=-1;
|
||||
exponent:=-exponent;
|
||||
end
|
||||
end
|
||||
else
|
||||
inc(exponent,decpoint);
|
||||
esign:=-1;
|
||||
exponent:=-exponent;
|
||||
end;
|
||||
|
||||
{ evaluate sign }
|
||||
{ (before exponent, because the exponent may turn it into a denormal) }
|
||||
fpc_Val_Real_ShortStr:=hd*sign;
|
||||
|
Loading…
Reference in New Issue
Block a user