Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: Format.printf broken
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-11-22 (17:33)
From: Pierre Weis <Pierre.Weis@i...>
Subject: Re: Format.printf broken
> Straight from an example in Format.mli:
> # Format.printf "@\[%s@ %d@\]" "x =" 1 ;;
> Uncaught exception: Invalid_argument("fprintf: unknown format \\")
> OCaml 2.03/Mac1.0a6
> Regards,
> Matías

There is no bug here, but a slight misunderstanding of the status of
.mli files wrt the documentation.

The documentation for the Caml modules M is not the verbatim m.mli
file, that is only the {\em source} of the documentation. In the
documentation extracted from format.mli, the example reads:

printf "@[%s@ %d@]" "x =" 1;;

and works perfectly.

Best regards,

Pierre Weis

INRIA, Projet Cristal,,