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] kprintf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-15 (14:52)
From: Christophe Delage <cdelage@e...>
Subject: [Caml-list] kprintf
     I saw that this function has just been added to ocaml,
I think this is a good idea, but I am wondering why
the continuation function should return a string.
I wrote once, for my programs, a "kprintf-like" function
with _exactly_ the same code (there is not much difference between
sprintf and kprintf ;-), but I forced the type :

 mykprintf : (string -> 'b) -> ('a, string -> 'b, 'b) format -> 'a

and (as far as I know) there were no problems,

 mykprintf f fmt a1 .. an

seems to do the same thing (and have the same type) as

 f (mykprintf fmt a1 .. an)

whatever the return type of f is.

I saw a post in the list about "technical reasons",
could somebody be more precise ?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: