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: -- (:)
From: Michael Leary <leary@n...>
Subject: Re: [Caml-list] flushing stdout with flush stdout not good?
On Mon, Sep 03, 2001 at 10:53:56PM -0400, Jon Moore wrote:
> In the code you wrote above, "fso" gets bound to () (and not to a function)
> after flushing stdout once. So the name and color functions you wrote are
> doing prints, and returning units, rather than invoking the flush as you
> thought. Thus, this is why the output becomes bursty (you're not actually
> flushing).

Heh, a pretty obvious mistake now that I look at it...  If it's fully
applied it's only the return value, otherwise it's a partially applied
function/closure awaiting more args.  All that lambda calculus stuff. :)

Bug reports:  FAQ:
To unsubscribe, mail  Archives: