From 8351bb059bea58dad2aeae2128d2aedaf19b8a8c Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 27 Nov 2002 11:29:21 +0000 Subject: [PATCH] * when converting from and to currency divide or multiple the result by 10000 --- compiler/ncnv.pas | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/compiler/ncnv.pas b/compiler/ncnv.pas index 1d0233e8e5..bad6aee2c6 100644 --- a/compiler/ncnv.pas +++ b/compiler/ncnv.pas @@ -791,10 +791,14 @@ implementation result:=nil; if is_currency(left.resulttype.def) and not(is_currency(resulttype.def)) then begin + left:=caddnode.create(slashn,left,crealconstnode.create(10000.0,left.resulttype)); + resulttypepass(left); end else - if is_currency(resulttype.def) then + if is_currency(resulttype.def) and not(is_currency(left.resulttype.def)) then begin + left:=caddnode.create(muln,left,crealconstnode.create(10000.0,left.resulttype)); + resulttypepass(left); end; if left.nodetype=realconstn then begin @@ -1971,7 +1975,11 @@ begin end. { $Log$ - Revision 1.89 2002-11-25 17:43:18 peter + Revision 1.90 2002-11-27 11:29:21 peter + * when converting from and to currency divide or multiple the + result by 10000 + + Revision 1.89 2002/11/25 17:43:18 peter * splitted defbase in defutil,symutil,defcmp * merged isconvertable and is_equal into compare_defs(_ext) * made operator search faster by walking the list only once