Version française
Home     About     Download     Resources     Contact us    
Browse thread
C-like macros in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] C-like macros in OCaml
On Tue, Jun 26, 2007 at 05:00:40PM -0500, Raj B wrote:
> Hi there
> 
> Is there any way I can achieve the use of C-like preprocessor macros  
> in OCaml?
> i.e.
> 
> #define FOO 1
> 
> etc.

What about ocamlc -pp /lib/cpp ? :-)

There's also a camlp4 macro preprocessor, but I can't remember now
whether it can do constant defines like that (IIRC it used not, but
now it can, or something like that).

Rich.

-- 
Richard Jones
Red Hat