Compiler/Simple file inclusion pre processor: Difference between revisions
Compiler/Simple file inclusion pre processor (view source)
Revision as of 11:04, 25 July 2021
, 2 years ago→{{header|AWK}}: Notes
(→{{header|AWK}}: Use @include, as in GAWK) |
(→{{header|AWK}}: Notes) |
||
Line 469:
=={{header|AWK}}==
AWK does not have file-inclusion as standard, however some implementations, particularly GNU Awk do provide file inclusion.
<br>This uses <code>@include</code> as the file inclusion directive, as in GAWK.
<br>
<br>The source can be a named file or read from stdin. If it is read from stdin, <code>-v sec=sourceName</code> can be specified on the AWK command line to name the file. The pre-processed source is writen to stdout.
<lang awk># include.awk: simple file inclusion pre-processor
|