Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003992OCamlOCaml generalpublic2006-03-26 13:452008-09-10 17:36
ReporterChristophe Troestler 
Assigned Toweis 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.09.1 
Target VersionFixed in Version3.11+dev 
Summary0003992: Printf: positional specifiers do not work
DescriptionAccording to the documentation, Printf.sprintf "%1$i" should be the same as Printf.sprintf "%i" but instead gives:

# Printf.sprintf "%1$i";;
Characters 15-21:
  Printf.sprintf "%1$i";;
                 ^^^^^^
Bad conversion %$, at char number 0 in format string ``%1$i''
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0004290closedweis printf positional specifiers don't work as described 
has duplicate 0004204closedweis Positional specifiers in Printf don't appear to work 
related to 0004321closedweis Scanf ignores possitional parameters parsing format strings... 

-  Notes
(0003609)
weis (developer)
2006-04-05 17:57

Indeed, the documentation is ahead from the typechecker's implementation.
A quick and easy fix is to change the documentation; a better fix would be to get the typechecker correct wrt the [printf] documentation.
I'll give a try to this last option.
(0004606)
doligez (administrator)
2008-09-10 17:36

Quick fix: remove positional parameters in printf/scanf and their documentation. They will come back when we manage to make them work perfectly.

- Issue History
Date Modified Username Field Change
2006-03-26 13:45 Christophe Troestler New Issue
2006-03-29 16:09 doligez Status new => assigned
2006-03-29 16:09 doligez Assigned To => weis
2006-04-05 17:57 weis Note Added: 0003609
2008-09-10 17:05 doligez Relationship added related to 0004321
2008-09-10 17:36 doligez Note Added: 0004606
2008-09-10 17:36 doligez Status assigned => closed
2008-09-10 17:36 doligez Resolution open => fixed
2008-09-10 17:36 doligez Fixed in Version => 3.11+dev
2008-09-11 13:49 doligez Relationship added has duplicate 0004290
2008-09-11 13:49 doligez Relationship added has duplicate 0004204


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker