You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 6535 Reporter: Nick Chapman Status: closed (set by @damiendoligez on 2016-04-06T11:48:00Z) Resolution: fixed Priority: normal Severity: minor Version: 4.02.0+beta1 / +rc1 Target version: 4.03.0+dev / +beta1 Fixed in version: 4.02.1 Category: ~DO NOT USE (was: OCaml general) Monitored by:@gasche
Conversion specifications have the following form:
% [flags] [width] [.precision] type
In 4.02, the '0' flag causes the width to be mandatory, which although quite reasonable is not explicitly required by the documentation. Probably the documentation should be fixed.
Steps to reproduce
$ ocaml -strict-formats
OCaml version 4.02.1+dev0-2014-08-29
Printf.printf "[%0.2f]\n" 1.2;;
Characters 14-25:
Printf.printf "[%0.2f]\n" 1.2;;
^^^^^^^^^^^
Error: invalid format "[%0.2f]\n": at character number 2, '0' without padding
The text was updated successfully, but these errors were encountered:
Original bug ID: 6535
Reporter: Nick Chapman
Status: closed (set by @damiendoligez on 2016-04-06T11:48:00Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.0+beta1 / +rc1
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.02.1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @gasche
Bug description
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printf.html
In 4.02, the '0' flag causes the width to be mandatory, which although quite reasonable is not explicitly required by the documentation. Probably the documentation should be fixed.
Steps to reproduce
$ ocaml -strict-formats
OCaml version 4.02.1+dev0-2014-08-29
Printf.printf "[%0.2f]\n" 1.2;;
Characters 14-25:
Printf.printf "[%0.2f]\n" 1.2;;
^^^^^^^^^^^
Error: invalid format "[%0.2f]\n": at character number 2, '0' without padding
The text was updated successfully, but these errors were encountered: