[erlang-questions] Stringification in erlang macros

Bjorn Gustavsson bgustavsson@REDACTED
Wed Sep 24 15:33:09 CEST 2008


On Wed, Sep 24, 2008 at 3:14 PM, Maxim Treskin <zerthurd@REDACTED> wrote:

> Hello
>
> Is it possible to stringify macros argument in erlang? In cpp we have
> #EXPR which replaces with string value of EXPR. I wrote something like
> this using parse_transform, but it is ugly, requires too much
> workarounds for works in every place in code and almost not works :)
>

Yes, see:

http://www.erlang.org/doc/reference_manual/macros.html#7.5

/Bjorn

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080924/1c382751/attachment.htm>


More information about the erlang-questions mailing list