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
[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 <> 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 Archives:
Bug reports: FAQ:
Beginner's list: