[erlang-questions] question: macro definition

Ahmed Ali <>
Tue Jan 15 14:31:52 CET 2008


Hi,

I have a question about macro definitions in Erlang.

When I write the following in my .hrl file:

<code>
[line 10] -define(LOG(X), io:format("~w~n",[X])).
[line 11] -define(LOG(X,D), io:format("~w~n",[X,D])).
</code>

I get the following compile error:

./../include/file.hrl:11: redefining macro ''LOG''

Can someone explain to me what "redefining" means here? Does that mean if I
cannot define a macro with the same name even though they have different
arity?

Best regards,

Ahmed Al-Issaei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080115/fcd10529/attachment.html>


More information about the erlang-questions mailing list