Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] selective printf-like function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andy Chou <acc@C...>
Subject: [Caml-list] selective printf-like function
I'd like to write a function that will optionally print something.  It 
seems simple, but I also want it to be able to take format strings and act 
like printf.  So for example,

	my_printf "%d" 0

but it should only print if a certain condition is true, which it
evaluates first.

I haven't had any luck yet, and I was wondering if any Caml gurus could 
help.

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