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

Syntax for printing @ using Format is completely incompatible between OCaml 3.12.1 and OCaml 4.00.1+dev #6024

Closed
vicuna opened this issue May 29, 2013 · 2 comments

Comments

@vicuna
Copy link

vicuna commented May 29, 2013

Original bug ID: 6024
Reporter: @yakobowski
Status: closed (set by @damiendoligez on 2013-05-29T15:56:49Z)
Resolution: fixed
Priority: high
Severity: block
Version: 4.00.1
Fixed in version: 4.01.0+dev
Category: standard library
Monitored by: @gasche bobot "Julien Signoles" prevosto

Bug description

Objective Caml version 3.12.1

Format.printf "@@";;

@- : unit = ()

Format.printf "%@";;

Error: Bad conversion %@, at char number 0 in format string ``%@''

    OCaml version 4.00.0

Format.printf "@@";;

@- : unit = ()

Format.printf "%@";;

@- : unit = ()

    OCaml version 4.01.0+dev15-2013-05-28

Format.printf "%@";;

@- : unit = ()

Format.printf "@@";;

Exception:
Invalid_argument
"Format.fprintf: bad format ``@@'', giving up at character number 1 (@).".

Furthermore, the logic beyond %@ is dubious at best, as % is used to escape special Printf characters, which is not the case for @.

@vicuna
Copy link
Author

vicuna commented May 29, 2013

Comment author: @yakobowski

The behavior in the trunk was probably implemented when #5973 was fixed.

@vicuna
Copy link
Author

vicuna commented May 29, 2013

Comment author: @damiendoligez

Fixed in trunk (rev 13713).

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

No branches or pull requests

1 participant