Browse thread
Calling OCaml from C - nothing shown on stdout
-
Andreas Sommer
- Erik de Castro Lopo
-
David Allsopp
- Matthieu Dubuget
- Andreas Sommer
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Matthieu Dubuget <matthieu.dubuget@g...> |
| Subject: | Re: [Caml-list] Calling OCaml from C - nothing shown on stdout |
-------- Original Message -------- Subject: Re: [Caml-list] Calling OCaml from C - nothing shown on stdout From: David Allsopp <dra-news@metastack.com> To: 'Andreas Sommer' <AndiDog@web.de>, 'caml-list@yquem.inria.fr' <caml-list@yquem.inria.fr> Date: 29/06/2010 13:18 > > 2. Insert a flush stdout statement after each Printf.printf call. Better, create another function using Printf.kprintf which flushes stdout each time: > let flushed_printf x = Printf.kprintf (fun s -> print_string s; flush stdout) in > flushed_printf "%s" "Finished with..." > Or use "%!" in your string format to flush. Salutations Matt