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
[Caml-list] printf and scanf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: jmarant@n...
Subject: Re: [Caml-list] printf and scanf
Pixel <pixel@mandrakesoft.com> writes:

> this only shows that " %2$s %1$d" is not a valid translation of " %s %d",
> since they do not have the same type, and would fail at runtime (using this in
> C would give you a segfault).
> " %2$d %1$s" with type "string -> int" is a valid translation of " %s %d"
> this means that not checking the translations could lead to a hole in the type
> system, and so printf must be prepared to detect type errors (which it
> currently does :)

  Hmm, you're correct, I was mistaken. Perhaps I should reead the sprintf manpage.
  But it doesn't have the feature anyway.


Jérôme Marant

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners