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 C++ section to tut/examples/mac101.flx[1 /1 ]
     1: include "std";
     2: print "This is mac101"; endl;
     3: 
End C++ section to tut/examples/mac101.flx[1]
Start C++ section to tut/examples/mac102.flx[1 /1 ]
     1: include "std";
     2: #include "mac101.flx"
     3: print "This is mac102"; endl;
     4: print "it should have printed the 101 message too"; endl;
     5: 
End C++ section to tut/examples/mac102.flx[1]