LogicalFile.Macros.Include (LogicalFile v1.1.1)
View SourceA sample implementation of a macro that provides 'include file' functionality.
It uses a regular expression to identiy include directives and inserts the
contents of an included file into the LogicalFile at the appropriate place.
It supports included files also including other files.
Summary
Functions
The general strategy is to work section-by-section. Where a section includes a line that matches the macro expression (which must have a file named capture to indicate the file to be included) the line is replaced with blanks, the file is inserted, and the search is restarted on the existing section (that could have more than one include), otherwise it is restarted using the next section.
Functions
The general strategy is to work section-by-section. Where a section includes a line that matches the macro expression (which must have a file named capture to indicate the file to be included) the line is replaced with blanks, the file is inserted, and the search is restarted on the existing section (that could have more than one include), otherwise it is restarted using the next section.