Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005803OCamlOCaml standard librarypublic2012-10-28 16:022013-07-11 18:01
Reporterhongboz 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.01.0+devFixed in Version4.01.0+dev 
Summary0005803: Format.fprintf does not support string substitution
Descriptionlet print_money currency_fmt sum =
    Printf.printf "ammount due: %(%i%)" currency_fmt sum;;
let print_dollar sum = print_money "$ %i" sum ;;

print_dollar 32;;

let print_money currency_fmt sum =
    Format.fprintf Format.std_formatter "ammount due: %(%i%)" currency_fmt sum;;
let print_dollar sum = print_money "$ %i" sum ;;
print_dollar 32;

the two print_dollars behave differently..
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0008684)
doligez (administrator)
2013-01-03 16:45

The second version prints "ammount due: ", then returns a wrong value (probably a closure) under the [unit] type. This is a bug in Format.
(0009759)
doligez (administrator)
2013-07-11 18:01

This appears to be fixed in 4.01.0+dev.

- Issue History
Date Modified Username Field Change
2012-10-28 16:02 hongboz New Issue
2013-01-03 16:45 doligez Note Added: 0008684
2013-01-03 16:45 doligez Status new => confirmed
2013-01-03 16:45 doligez Target Version => 4.00.2+dev
2013-07-11 18:01 doligez Note Added: 0009759
2013-07-11 18:01 doligez Status confirmed => resolved
2013-07-11 18:01 doligez Resolution open => fixed
2013-07-11 18:01 doligez Fixed in Version => 4.01.0+dev
2013-07-11 18:01 doligez Target Version 4.00.2+dev => 4.01.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker