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

format "%#" rejected as legacy format #6536

vicuna opened this issue Sep 2, 2014 · 1 comment

format "%#" rejected as legacy format #6536

vicuna opened this issue Sep 2, 2014 · 1 comment


Copy link

@vicuna vicuna commented Sep 2, 2014

Original bug ID: 6536
Reporter: Nick Chapman
Status: closed (set by @damiendoligez on 2014-09-15T11:15:25Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.0+beta1 / +rc1
Fixed in version: 4.02.1+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche

Bug description

but its still documented
#: request an alternate formatting style for numbers.

Steps to reproduce

$ ocaml -strict-formats
OCaml version 4.02.1+dev0-2014-08-29

Printf.printf "[%#.0f]" 1.2;;

Characters 14-23:
Printf.printf "[%#.0f]" 1.2;;
Error: invalid format "[%#.0f]": at character number 1, '#' is incompatible with 'f' in sub-format "%#.0f"

Copy link

@vicuna vicuna commented Sep 15, 2014

Comment author: @damiendoligez

The # flag is only valid with octal and hexadecimal integer types. I have documented it accordingly (commit 15228).

@vicuna vicuna closed this as completed Sep 15, 2014
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant