English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/