[erlang-questions] question: macro definition

Ahmed Ali ahmed.nawras@REDACTED
Tue Jan 15 14:31:52 CET 2008


I have a question about macro definitions in Erlang.

When I write the following in my .hrl file:

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

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

Best regards,

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

More information about the erlang-questions mailing list