[erlang-questions] simplified attribute declaration

Bengt Kleberg <>
Thu Mar 18 10:33:25 CET 2010


Greetings,

Are you sure about -define without parentheses?

On my system (R13B03) I get:
./bfile.erl:3: badly formed 'define'

Perhaps I need a flag to the compilation?


bengt

On Thu, 2010-03-18 at 10:14 +0100, Vlad Dumitrescu wrote:
> Hi,
> 
> I don't remember anyone mentioning this before, but I think it's cool
> and should be promoted as the recommended syntax:
> 
> All attributes can now (R13) be specified without parantheses!
> 
> -module hello_world.
> -export [init/1, stop/2].
> -define DEBUG(X), io:format("debug: ~p~n", [X]).
> 
> best regards,
> Vlad
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
> 



More information about the erlang-questions mailing list