mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 13:49:12 +02:00
* 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:
parent
39d6d4800f
commit
7fe6c0d95d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12294,6 +12294,7 @@ tests/webtbs/tw21029.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw21044.pp svneol=native#text/pascal
|
tests/webtbs/tw21044.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw21073.pp svneol=native#text/plain
|
tests/webtbs/tw21073.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw2109.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/tw2110.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw21146.pp svneol=native#text/pascal
|
tests/webtbs/tw21146.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw21151.pp svneol=native#text/plain
|
tests/webtbs/tw21151.pp svneol=native#text/plain
|
||||||
|
@ -261,7 +261,7 @@ implementation
|
|||||||
scurrency:
|
scurrency:
|
||||||
begin
|
begin
|
||||||
if is_constintnode(n) then
|
if is_constintnode(n) then
|
||||||
intvalue := tordconstnode(n).value
|
intvalue:=tordconstnode(n).value*10000
|
||||||
{ allow bootstrapping }
|
{ allow bootstrapping }
|
||||||
else if is_constrealnode(n) then
|
else if is_constrealnode(n) then
|
||||||
intvalue:=PInt64(@trealconstnode(n).value_currency)^
|
intvalue:=PInt64(@trealconstnode(n).value_currency)^
|
||||||
|
10
tests/webtbs/tw21091.pp
Normal file
10
tests/webtbs/tw21091.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user