Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] flushing stdout with flush stdout not good?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alexander V. Voinov <avv@q...>
Subject: Re: [Caml-list] flushing stdout with flush stdout not good?
Hi All,

Michael Leary wrote:
> let fso = flush stdout
> let name s = printf "Name %s\n" s; fso
> let color c = printf "Colour %s\n" c; fso

A question to All concerned, especially to the language creators. As I
understood the notion of 'eagerness', the first line should evaluate
immediately (, flush stdout) and return () (or whatever does 'flush'
return). In the subsequent functions this value would be reevaluated to
itself, returned and discarded. No more flushes to stdout should appear
at these. Right? Is there just a misprint, so that the correct
definition should read:

let fso () = flush stdout?

Alexander
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr