English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 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