[erlang-questions] Compiler to warn on used underscore-variables

Zoltan Lajos Kis <>
Tue Jan 5 10:09:37 CET 2010


> You can change that to this, and you will get no warnings:
>
> -ifdef(DEBUG).
> -define(debug(Str, Vars),  io:format(Str, Vars)).
> -else.
> -define(debug(Str, Vars),  Vars=Vars).
> -endif.
>
> Zoltan.
>
>
Oops, sorry, this doesn't work nicely because of the list construction...



More information about the erlang-questions mailing list