Include a file: Difference between revisions
Content added Content deleted
(→{{header|UNIX Shell}}: Bash has "source" too) |
(→{{header|AWK}}: GNU awk @include) |
||
Line 43: | Line 43: | ||
#!/usr/bin/awk -f one.awk -f two.awk |
#!/usr/bin/awk -f one.awk -f two.awk |
||
==={{header|Gawk}}=== |
|||
GNU Awk has an <code>@include</code> which can include another awk source file at that point in the code. |
|||
<lang awk>@include "filename.awk"</lang> |
|||
This is a parser-level construct and so must be a literal filename, not a variable or expression. If the filename is not absolute then it's sought in an <code>$AWKPATH</code> list of directories. See [http://www.gnu.org/software/gawk/manual/html_node/Include-Files.html the gawk manual] for more. |
|||
=={{header|BASIC}}== |
=={{header|BASIC}}== |