tw10920.pp 433 B

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