Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printf: positional specifiers do not work #3992

Closed
vicuna opened this issue Mar 26, 2006 · 2 comments
Closed

Printf: positional specifiers do not work #3992

vicuna opened this issue Mar 26, 2006 · 2 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 26, 2006

Original bug ID: 3992
Reporter: @Chris00
Assigned to: @pierreweis
Status: closed (set by @damiendoligez on 2008-09-10T15:36:26Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.09.1
Fixed in version: 3.11+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #4204 #4290
Related to: #4321

Bug description

According 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''

@vicuna
Copy link
Author

vicuna commented Apr 5, 2006

Comment author: @pierreweis

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.

@vicuna
Copy link
Author

vicuna commented Sep 10, 2008

Comment author: @damiendoligez

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants