Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/