Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003902OCamlOCaml generalpublic2005-12-01 17:302006-05-06 09:53
Reportervanicat 
Assigned Toweis 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.09.0 
Target VersionFixed in Version3.09.0 
Summary0003902: printf format strings type is wrong.
DescriptionWhen trying the new printf format, I've the following, which is very very strange:
# Printf.printf "%{%d%s%}" "kk%dkk%s\n" ;;
- : unit = <unknown constructor>
# let t = Obj.repr (Printf.printf "%{%d%s%}" "kk%dkk%s\n");;
# Obj.is_block t;;
- : bool = true
# Obj.is_block (Obj.repr ());;
- : bool = false
# Obj.tag t;;
- : int = 247
# Obj.closure_tag;;
- : int = 247

So it seem that Printf.printf "%{%d%s%}" "kk%dkk%s\n" should have a functional type, not unit.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003407)
oandrieu (reporter)
2005-12-01 19:41

It seems that the function Printf.nargs_of_format_type counts each %( %{ %) and %} as an argument ... which looks wrong. And in the case of %{, the internal % shouldn't be counted.
(0003429)
weis (developer)
2005-12-12 23:35

Due to bad interaction with the new semantics for printf, this issue will be corrected ASAP.
(0003516)
weis (developer)
2006-01-23 18:42

Bug fixed in sources 3.09.2+dev2 (2006-01-23).
(0003637)
xleroy (administrator)
2006-05-06 09:53

Appears fixed in 3.09.2. Closing this PR.

- Issue History
Date Modified Username Field Change
2005-12-01 17:30 vanicat New Issue
2005-12-01 19:41 oandrieu Note Added: 0003407
2005-12-12 23:30 weis Status new => assigned
2005-12-12 23:30 weis Assigned To => weis
2005-12-12 23:35 weis Note Added: 0003429
2006-01-23 18:42 weis Note Added: 0003516
2006-01-23 18:47 weis Status assigned => resolved
2006-01-23 18:47 weis Fixed in Version => 3.09.0
2006-01-23 18:47 weis Resolution open => fixed
2006-05-06 09:53 xleroy Note Added: 0003637
2006-05-06 09:53 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker