caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Format question
@ 2002-11-07  0:09 Oleg
  2002-11-07  0:31 ` Alessandro Baretta
  2002-11-07  0:46 ` Gerd Stolpmann
  0 siblings, 2 replies; 6+ messages in thread
From: Oleg @ 2002-11-07  0:09 UTC (permalink / raw)
  To: caml-list

Oleg wrote: 

>
> Is it possible to define a printf that automatically flushes stdout?
>

I figured it out:

let my_printf (x : ('a, out_channel, unit) format) = 
   let tmp = Printf.printf x in flush stdout; tmp;;

Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Caml-list] Format question
@ 2002-11-06 22:49 Oleg
  2002-11-06 23:46 ` David Brown
  2002-11-20  0:29 ` David Frese
  0 siblings, 2 replies; 6+ messages in thread
From: Oleg @ 2002-11-06 22:49 UTC (permalink / raw)
  To: caml-list

Hi

Is it possible to define a printf that automatically flushes stdout?

let my_printf x = Printf.printf x; flush stdout;;

my_printf "%i" 3;;

doesn't work (Incorrect number of arguments, as the type of my_printf is 
different from Printf.printf)

Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-20  0:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07  0:09 [Caml-list] Format question Oleg
2002-11-07  0:31 ` Alessandro Baretta
2002-11-07  0:46 ` Gerd Stolpmann
  -- strict thread matches above, loose matches on Subject: below --
2002-11-06 22:49 Oleg
2002-11-06 23:46 ` David Brown
2002-11-20  0:29 ` David Frese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).