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
Corrupt output of printf
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-23 (14:20)
From: Dawid Toton <d0@w...>
Subject: Re: [Caml-list] (Not) corrupt output of printf

> Weird ... I was going to suggeest it was because you weren't flushing
> the output after each print statement.  

This raises important question:
Let's see the output as a sequence of bytes (there's no time).
Assuming that the process exits normally and incompatible printing 
functions are not mixed:
is there a guarantee (in OCaml library) that the flush operation doesn't 
affect the output?

For me it's obvious that the output shouldn't depend on the presence of 
flush operations. If otherwise - needs to be explicitly stated.

(Of course I'm not considering the one special flush action done when 
closing a stream, but it's tied to the closing function.)