Browse thread
[Caml-list] Printf question
-
Brian Hurt
- Manos Renieris
- William Lovas
- Basile STARYNKEVITCH
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Manos Renieris <er@c...> |
| Subject: | Re: [Caml-list] Printf question |
On Sat, May 17, 2003 at 08:34:27PM -0500, Brian Hurt wrote:
>
> I want to define a wrapper function for printf, basically for debug. I'd
> I tried:
> let debug s = Printf.printf ("FOO: " ^ s ^ "\n")
> and:
> let debug s = let t = "FOO: " ^ s ^ "\n" in Printf.printf s
> and neither works.
You need to concatenate formats, not strings. In the CVS version,
(^^) is defined, and does exactly that.
-- Manos
-------------------
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