HOW TO INCLUDE A FILE IN ERLANG?

Tarun Kumar

Total Post:107

Points:535
Posted by  Tarun Kumar
 438  View(s)
Ratings:
Rate this:
  1. Tarun Kumar

    Post:107

    Points:535
    How to Include a file in Erlang?

    To include a file using preprocessors:
    -include(FileName).
    -include_lib(FileName).
    FileName, is a string which is pointing to a file. and the contents will be included according to the position of the directive. The FileName is recommended to use the file name which has .hrl extension for including files.
    For Example:
    -include("sample_file.hrl").
    -include("my_records.hrl").
    -include_lib("kernel/included_files/my_file.hrl").

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!