Re: Format.printf broken

From: Pierre Weis (Pierre.Weis@inria.fr)
Date: Mon Nov 22 1999 - 18:24:57 MET


From: Pierre Weis <Pierre.Weis@inria.fr>
Message-Id: <199911221724.SAA27015@pauillac.inria.fr>
Subject: Re: Format.printf broken
To: matias@k-bell.com
Date: Mon, 22 Nov 1999 18:24:57 +0100 (MET)
In-Reply-To: <383839C9.61A4136E@k-bell.com> from "=?iso-8859-1?Q?Mat=EDas?= Giovannini" at Nov 21, 99 03:28:25 pm

> 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/



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:28 MET