1.1. Include directive

The #include directive takes the same form as the corresponding C preprocessor directive.

The file names used in include directives MUST be Unix style relative file names, no matter what operating system is hosting the compilation.

[To be done: should require URL format]

Relative file names inside angle brackets <> are searched for in the include path passed to the compiler on the command line.

Relative file names in double quotes are searched for first in the directory containing the file which contains the include directive, then in the include path passed to the compiler on the command line.

Absolute file names are NOT permitted. Files relative to the current directory are NOT permitted. In both cases the reason is to enhance the prospects for portability.

The C form #include MACRO is not accepted.

Note the notion path searching will be replaced by a more powerful technique allowing shadowed directories in the future.

Unlike the C #include directive, Felix only includes a file once: note that symbolic links will defeat the check for a duplication.

Start felix section to tut/macros/mac-1.01-0.flx[1 /1 ]
     1: #line 61 "./lpsrc/flx_tut_macro.pak"
     2: #import <flx.flxh>
     3: print "This is tut/macros/mac-1.01-0.flx"; endl;
End felix section to tut/macros/mac-1.01-0.flx[1]
Start data section to tut/macros/mac-1.01-0.expect[1 /1 ]
     1: This is tut/macros/mac-1.01-0.flx
End data section to tut/macros/mac-1.01-0.expect[1]
Start felix section to tut/macros/mac-1.01-1.flx[1 /1 ]
     1: #line 71 "./lpsrc/flx_tut_macro.pak"
     2: #import <flx.flxh>
     3: #include "mac-1.01-0.flx"
     4: print "This is tut/macros/mac-1.01-1.flx"; endl;
     5: print "it should have printed the tut/macros/mac-1.01-0.flx message too"; endl;
End felix section to tut/macros/mac-1.01-1.flx[1]
Start data section to tut/macros/mac-1.01-1.expect[1 /1 ]
     1: This is tut/macros/mac-1.01-0.flx
     2: This is tut/macros/mac-1.01-1.flx
     3: it should have printed the tut/macros/mac-1.01-0.flx message too
End data section to tut/macros/mac-1.01-1.expect[1]