tags:

views:

253

answers:

2

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
So they only ahve definitions, no code?
Zubair
@zubair: see my updated contribution.
jldupont
You can also use `-include_lib` to include a header file from another application.
Zed
@zed: yes, see the following SO question: http://stackoverflow.com/questions/1847918/erlang-what-is-the-difference-between-include-lib-and-include
jldupont
A: 

hrl files are simply erlang "header", that is files containing common definitions that are intended to be included by .erl files.

tonio