September 2013
Intermediate to advanced
548 pages
12h 25m
English
Files can be included with the following syntax:
| | -include(Filename). |
In Erlang, the convention is that include files have the
extension hrl. The FileName should contain an
absolute or relative path so that the preprocessor can locate the
appropriate file. Library header files can be included with the following
syntax:
| | -include_lib(Name). |
Here’s an example:
| | -include_lib("kernel/include/file.hrl"). |
In this case, the Erlang compiler will find the appropriate
include files. (kernel, in the previous example, refers to the
application that defines this header file.)
Include files usually contain record definitions. If many modules need to share common record definitions, then the common record definitions are put into include ...
Read now
Unlock full access