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] kprintf with user formatters
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-19 (10:45)
From: Jon Harrop <postmaster@j...>
Subject: Re: [Caml-list] kprintf with user formatters
On Monday 19 July 2004 11:10, Pierre Weis wrote:
> They also can have the wrong idea that arguments are not evaluated
> (since there is no need to convert them to string) which is wrong.

Forgive me if this is irrelevant (I've failed to understand all of your 
discussion) but can this be tied in with a general way to define functions 
with specified argument evaluation, e.g. to define your own, short-circuit-
evaluated && operator:

# (print_endline "1"; false) && (print_endline "2"; true);;
1
- : bool = false
# let (&&) a b = a && b;;
val ( && ) : bool -> bool -> bool = <fun>
# (print_endline "1"; false) && (print_endline "2"; true);;
2
1
- : bool = false

Not that I need such a thing...

Cheers,
Jon.

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