mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 03:49:19 +02:00
* moved all loal variables to one block (necessary for ppc until nested
procedures are properly supported)
This commit is contained in:
parent
9055529171
commit
4e40e71cbb
@ -60,7 +60,7 @@ type
|
|||||||
TIntPartStack = array[1..maxDigits+1] of valReal;
|
TIntPartStack = array[1..maxDigits+1] of valReal;
|
||||||
|
|
||||||
var
|
var
|
||||||
roundCorr, corrVal: valReal;
|
roundCorr, corrVal, factor, orgd: valReal;
|
||||||
spos, endpos, fracCount: longint;
|
spos, endpos, fracCount: longint;
|
||||||
correct, currprec: longint;
|
correct, currprec: longint;
|
||||||
temp : string;
|
temp : string;
|
||||||
@ -69,6 +69,16 @@ var
|
|||||||
dot : byte;
|
dot : byte;
|
||||||
mantZero, expMaximal: boolean;
|
mantZero, expMaximal: boolean;
|
||||||
|
|
||||||
|
|
||||||
|
maxlen : longint; { Maximal length of string for float }
|
||||||
|
minlen : longint; { Minimal length of string for float }
|
||||||
|
explen : longint; { Length of exponent, including E and sign.
|
||||||
|
Must be strictly larger than 2 }
|
||||||
|
const
|
||||||
|
maxexp = 1e+35; { Maximum value for decimal expressions }
|
||||||
|
minexp = 1e-35; { Minimum value for decimal expressions }
|
||||||
|
zero = '0000000000000000000000000000000000000000';
|
||||||
|
|
||||||
procedure RoundStr(var s: string; lastPos: byte);
|
procedure RoundStr(var s: string; lastPos: byte);
|
||||||
var carry: longint;
|
var carry: longint;
|
||||||
begin
|
begin
|
||||||
@ -163,15 +173,6 @@ var
|
|||||||
{$endif DEBUG_NASM}
|
{$endif DEBUG_NASM}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var maxlen : longint; { Maximal length of string for float }
|
|
||||||
minlen : longint; { Minimal length of string for float }
|
|
||||||
explen : longint; { Length of exponent, including E and sign.
|
|
||||||
Must be strictly larger than 2 }
|
|
||||||
const
|
|
||||||
maxexp = 1e+35; { Maximum value for decimal expressions }
|
|
||||||
minexp = 1e-35; { Minimum value for decimal expressions }
|
|
||||||
zero = '0000000000000000000000000000000000000000';
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
case real_type of
|
case real_type of
|
||||||
rt_s32real :
|
rt_s32real :
|
||||||
@ -355,8 +356,10 @@ begin
|
|||||||
if (currPrec >= 0) then
|
if (currPrec >= 0) then
|
||||||
begin
|
begin
|
||||||
corrVal := 0.5;
|
corrVal := 0.5;
|
||||||
|
factor := 1;
|
||||||
for fracCount := 1 to currPrec do
|
for fracCount := 1 to currPrec do
|
||||||
corrVal := corrVal / 10.0;
|
factor := factor * 10.0;
|
||||||
|
corrval := corrval / factor;
|
||||||
if d >= corrVal then
|
if d >= corrVal then
|
||||||
d := d + corrVal;
|
d := d + corrVal;
|
||||||
if int(d) = 1 then
|
if int(d) = 1 then
|
||||||
@ -439,7 +442,11 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2002-10-04 16:41:17 jonas
|
Revision 1.8 2003-05-16 23:22:31 jonas
|
||||||
|
* moved all loal variables to one block (necessary for ppc until nested
|
||||||
|
procedures are properly supported)
|
||||||
|
|
||||||
|
Revision 1.7 2002/10/04 16:41:17 jonas
|
||||||
* fixed web bug 2131
|
* fixed web bug 2131
|
||||||
|
|
||||||
Revision 1.6 2002/09/07 15:07:46 peter
|
Revision 1.6 2002/09/07 15:07:46 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user