[erlang-questions] ?DATE and ?TIME MACROs

harry mpharrison@REDACTED
Tue Oct 7 12:22:35 CEST 2008


Excellent, thanks!

I'm struggling to find docs on module_info.
I'm guessing erlc inserts it into each module, and it uses beam_lib?

Rgds,

Matthew (aka Harry)

On Oct 7, 10:35 am, Mats Cronqvist <mats.cronqv...@REDACTED> wrote:
> harry wrote:
> > Hi,
>
> > trawling through the archives I found the answer to how to do a ?
> > FUNCTION macro.
>
> > How would you do ?DATE and ?TIME (apart from erlc -DDATE=`time` ....
> > or something similar, which is *nix specific)
>
> -define(DATE,proplists:get_value(time,?MODULE:module_info(compile))).
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questi...@REDACTED://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list