mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 05:39:26 +02:00

of fractional digits in case it's not the last value of the write(ln) statement (mantis #10920) git-svn-id: trunk@10421 -
19 lines
433 B
ObjectPascal
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.
|
|
|