Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Location in source code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-01-28 (04:23)
From: Ian Zimmerman <itz@s...>
Subject: Re: [Caml-list] Location in source code

Mathieu> Hello, I would like to be able to define in OCaml analogues
Mathieu> of the cpp macros __FILE__ and __LINE__, for debugging
Mathieu> purposes.  For instance, I would like to be able to write

Mathieu> Printf.printf "I had an error in module %s at line %d"
Mathieu> __MODULE__ __LINE__

Isn't this what assertions are for?

Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087
In his own soul a man bears the source
from which he draws all his sorrows and his joys.
Bug reports:  FAQ:
To unsubscribe, mail  Archives: