mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 06:59:42 +02:00

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 -
17 lines
470 B
ObjectPascal
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.
|