fpc/tests/webtbs/tw36179.pp
florian aadd93847f -- Zusammenführen von r43620 in ».«:
U    compiler/nadd.pas
U    compiler/ncnv.pas
U    compiler/ncon.pas
U    compiler/node.pas
A    tests/test/tcurrency1.pp
A    tests/webtbs/tw33963.pp
A    tests/webtbs/tw36179.pp
-- Aufzeichnung der Informationen für Zusammenführung von r43620 in ».«:
 U   .

git-svn-id: branches/fixes_3_2@43621 -
2019-12-01 20:29:52 +00:00

17 lines
470 B
ObjectPascal

var
c: currency;
s: string;
begin
c:=922337203685.47;
writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000)); // expected 9223372036854700, but get -75
str(trunc(c*10000),s);
if s<>'9223372036854700' then
halt(1);
c:=-92233720368547;
writeln(c:18:4,' = ', ' Trunc(c*10000)=', Trunc(c*10000)); // expected -922337203685470000, but get 7580
str(trunc(c*10000),s);
if s<>'-922337203685470000' then
halt(1);
writeln('ok');
end.