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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Line buffering
On Tue, Dec 07, 2004 at 07:10:00PM +0100, wrote:
>    Date: Tue, 7 Dec 2004 13:57:45 +0000
>    From: Richard Jones <>
>    Is there a way to set line buffering, particularly of stdout?
> Short answer: no.
> The OCaml I/O system doesn't use C's FILE *.  It's (much) simpler,
> efficient, and just not done with line buffering as a goal.  I looked
> at it (io.c) while implementing Cash (line buffering is in the
> original specification), and adding this would have made a too big
> patch.  I gave up.

I noticed before that OCaml seems to implement its own I/O buffering
system, instead of using FILE* (or sfio, I guess).  Is there a reason
for that?

Thanks for the info anyway.  It's somewhat annoying that stdout can't
be line buffered.


Richard Jones.
>>> - collaboration tools for teams   <<<
Merjis Ltd. - improving website return on investment
Learn Objective CAML -