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: Michael Leary <leary@n...>
Subject: Re: [Caml-list] flushing stdout with flush stdout not good?
I should give example:

a series of about 13 functions like these:

let name s = printf "Name %s" s; print_newline ()
let color c = printf "Colour %s" c; print_newline ()

about half have three or four arguments, usually floats

if I write them this way:

let fso = flush stdout
let name s = printf "Name %s\n" s; fso
let color c = printf "Colour %s\n" c; fso

It becomes very ugly and "bursty".  The only modules in use are Str,
Printf, and List.

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