FunnelWeb provides an include file facility with a maximum depth of 10. When FunnelWeb sees a line of the form @i <filename>,@i it replaces the entire line (including the EOL) with the contents of the specified include file. FunnelWeb's include file facility is intended to operate at the line level. If the last line of the include file is not terminated by an EOL, FunnelWeb issues a warning and interts one (in the copy in memory).
The @i construct is illegal if it appears anywhere except at the start of a line. The construct must be followed by a single blank. The file name is defined to be everything between the blank and the end of the line (no comments (@!) please!). Example: If the input file is
"Uh Oh, It's the Fuzz. We're busted!" said Baby Bear. @i mr_plod.txt "Quick! Flush the stash down the dunny and let's split." said Father Bear.
and there is a file called mr_plod.txt containing
"'Ello, 'Ello, 'Ello! What's all this 'ere then?" Mr Plod exclaimed.
then the scanner translates the input file into
"Uh Oh, It's the Fuzz. We're busted!" said Baby Bear. "'Ello, 'Ello, 'Ello! What's all this 'ere then?" Mr Plod exclaimed. "Quick! Flush the stash down the dunny and let's split." said Father Bear.
As a point of terminology, FunnelWeb calls the original input file the input file and calls include files and their included files include files.
The include file construct operates at a very low level. An include line can appear anywhere in the input file regardless of the context of the surrounding lines.
FunnelWeb sets the special character to the default (@) at the start of each include file and restores it to its previous value at the end of the include file. This allows macro libraries to be constructed and included that are independent of the prevailing special character at the point of inclusion. The same goes for the input line length limit which is reset to the default value at the start of each include file and restored to its previous value afterwards.