I've looked on the web for this but it is not at all clear. Is it some sort of library mechanism?
+3
A:
An "header file" akin to a "C" include file.
One needs to the -include
directive from a .erl
file to use them. Can contain any valid Erlang code.
jldupont
2010-02-22 16:25:05
So they only ahve definitions, no code?
Zubair
2010-02-22 16:28:52
@zubair: see my updated contribution.
jldupont
2010-02-22 16:34:55
You can also use `-include_lib` to include a header file from another application.
Zed
2010-02-22 16:48:23
@zed: yes, see the following SO question: http://stackoverflow.com/questions/1847918/erlang-what-is-the-difference-between-include-lib-and-include
jldupont
2010-02-22 17:08:11
A:
hrl files are simply erlang "header", that is files containing common definitions that are intended to be included by .erl files.
tonio
2010-02-22 16:25:37