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] 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: 2001-09-04 (02:43)
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?

Bug reports:  FAQ:
To unsubscribe, mail  Archives: