* handle currency constants correctly on non i386 platforms if they are given as integer constant, resolves #21091

git-svn-id: trunk@20734 -
This commit is contained in:
florian 2012-04-06 22:13:48 +00:00
parent 39d6d4800f
commit 7fe6c0d95d
3 changed files with 12 additions and 1 deletions

1
.gitattributes vendored
View File

@ -12294,6 +12294,7 @@ tests/webtbs/tw21029.pp svneol=native#text/plain
tests/webtbs/tw21044.pp svneol=native#text/pascal
tests/webtbs/tw21073.pp svneol=native#text/plain
tests/webtbs/tw2109.pp svneol=native#text/plain
tests/webtbs/tw21091.pp svneol=native#text/pascal
tests/webtbs/tw2110.pp svneol=native#text/plain
tests/webtbs/tw21146.pp svneol=native#text/pascal
tests/webtbs/tw21151.pp svneol=native#text/plain

View File

@ -261,7 +261,7 @@ implementation
scurrency:
begin
if is_constintnode(n) then
intvalue := tordconstnode(n).value
intvalue:=tordconstnode(n).value*10000
{ allow bootstrapping }
else if is_constrealnode(n) then
intvalue:=PInt64(@trealconstnode(n).value_currency)^

10
tests/webtbs/tw21091.pp Normal file
View File

@ -0,0 +1,10 @@
CONST C : Currency = 100;
var
s : string;
begin
str(C:10:2,s);
if s<>' 100.00' then
halt(1);
writeln('ok');
end.