9. Preprocessor
9 Preprocessor
9.1 File Inclusion
A file can be included as follows:
-include(File). -include_lib(File).
File
, a string, is to point out a file. The contents of this file are included as is, at the position of the directive.
Include files are typically used for record and macro definitions that are shared by several modules. It is recommended to use the file name extension .hrl
for include files.
File
can start with a path component $VAR
, for some string VAR
. If that is the case, the value of the environment variable VAR
as returned by os:getenv(VAR)
is substituted for $VAR
. If os:getenv(VAR)
returns false
, $