diff options
author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-23 13:06:59 +0000 |
---|---|---|
committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-23 13:06:59 +0000 |
commit | b76d6706128f369d1a3182a290ce1ca47eaa4044 (patch) | |
tree | da748df0b0b910e52403bc95dae98ff217f47caf /packages/rtl-objpas/src/inc/fmtbcd.pp | |
parent | 156b6cdf2d34620a093680380a692a4fd8e22006 (diff) | |
download | fpc-b76d6706128f369d1a3182a290ce1ca47eaa4044.tar.gz |
--- Merging r48876 into '.':
U packages/rtl-objpas/src/inc/fmtbcd.pp
--- Recording mergeinfo for merge of r48876 into '.':
G .
--- Merging r49021 into '.':
U packages/fcl-process/src/win/process.inc
--- Recording mergeinfo for merge of r49021 into '.':
G .
# revisions: 48876,49021
r48876 | marco | 2021-03-04 11:37:50 +0100 (Thu, 04 Mar 2021) | 1 line
Changed paths:
M /trunk/packages/rtl-objpas/src/inc/fmtbcd.pp
* Patch from Lacak. Better fix for mantis 30853
r49021 | marco | 2021-03-20 22:45:19 +0100 (Sat, 20 Mar 2021) | 1 line
Changed paths:
M /trunk/packages/fcl-process/src/win/process.inc
* also assign threadid. mantis 38645
git-svn-id: https://svn.freepascal.org/svn/fpc/branches/fixes_3_2@49039 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/rtl-objpas/src/inc/fmtbcd.pp')
-rw-r--r-- | packages/rtl-objpas/src/inc/fmtbcd.pp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/rtl-objpas/src/inc/fmtbcd.pp b/packages/rtl-objpas/src/inc/fmtbcd.pp index f26041d984..293bc346fc 100644 --- a/packages/rtl-objpas/src/inc/fmtbcd.pp +++ b/packages/rtl-objpas/src/inc/fmtbcd.pp @@ -797,10 +797,12 @@ INTERFACE {$endif} function __get_null : tBCD; Inline; + function __get_zero : tBCD; Inline; function __get_one : tBCD; Inline; PROPERTY NullBCD : tBCD Read __get_null; + ZeroBCD : tBCD Read __get_zero; OneBCD : tBCD Read __get_one; //{$define __lo_bh := 1 * ( -( MaxFmtBCDFractionSize * 1 + 2 ) ) } @@ -887,16 +889,20 @@ IMPLEMENTATION OneBCD_ : tBCD; function __get_null : tBCD; Inline; - begin __get_null := NullBCD_; - end; + end; - function __get_one : tBCD; Inline; + function __get_zero : tBCD; Inline; + begin + __get_zero := NullBCD_; + __get_zero.Precision := 1; + end; + function __get_one : tBCD; Inline; begin __get_one := OneBCD_; - end; + end; type range_digits = 1..maxfmtbcdfractionsize; @@ -1584,7 +1590,7 @@ IMPLEMENTATION begin _SELECT _WHEN aValue = 0 - _THEN result := NullBCD; + _THEN result := ZeroBCD; _WHEN aValue = 1 _THEN result := OneBCD; _WHEN aValue = low ( myInttype ) @@ -4130,12 +4136,6 @@ begin else { array or something like that } not_implemented; end; - // peephole, avoids problems with databases, mantis #30853 - if (Result.Precision = 0) and (Result.SignSpecialPlaces = 0) then - begin - Result.Precision := 10; - Result.SignSpecialPlaces := 2; - end; end; function VarToBCD ( const aValue : Variant ) : tBCD; |