Browse thread
camlp4 pa_macro
[
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: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | Re: [Caml-list] camlp4 pa_macro |
> > > IFDEF NDEBUG THEN
> > > DEFINE LOG(expr) = ()
> > > ELSE
> > > DEFINE LOG(expr) = Printf.printf expr
> > > ENDIF
> > > ...
> > > LOG("x=%d,y=%d" x y);
I don't see anything that says the DEFINEs have to be symmetric.
Maybe this doesn't handle parameters like I assume it would, but how about:
IFDEF NDEBUG THEN
DEFINE LOG(expr) = ()
ELSE
DEFINE LOG = Printf.printf
ENDIF
Jonathan