fpc/tests/webtbs/tw10920.pp
Jonas Maebe d80d3f36d2 * fixed crash when writing a currency value with a specified number
of fractional digits in case it's not the last value of the
    write(ln) statement (mantis #10920)

git-svn-id: trunk@10421 -
2008-03-02 10:22:25 +00:00

19 lines
433 B
ObjectPascal

program bug_fmtcurrncy;
// If write/writeln parameter list includes any item FOLLOWING a
// currency variable with format specs, the compiler throws
// an Access violation exception.
var
V: currency; // currency blows up, all other real types are Ok
BEGIN
V := 34567;
write( V:0:2, 'x' ); // This form produces the error
write( V:0:2 ); // This equivalent form compiles Ok
writeln( 'x' );
END.