|
|
| Author |
Message |
< Erlang ~ HRL Files and best practice |
| kenrobinson |
Posted: Fri Feb 05, 2010 12:10 am |
|
|
|
User
Joined: 20 Apr 2009
Posts: 12
|
Hi All,
I found I got a compile time error when I included a common .hrl file which two other .hrl files pointed to. It said I had a redefinition of a macro. To get around this I did the following.
-ifndef(JAUS_BASIC_TYPES_HRL).
-define(JAUS_BASIC_TYPES_HRL, 0).
-define(PRIORITY_LOW, 0).
-define(PRIORITY_STANDARD, 1).
-define(PRIORITY_HIGH, 2).
-define(PRIORITY_SAFETY_CRIT, 3).
-endif.
Is this the way one handles this (like C++) or is there some better way? |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|