Include a file: Difference between revisions

Content added Content deleted
(→‎{{header|AWK}}: GNU awk @include)
(add Gnuplot)
Line 142: Line 142:
=={{header|GAP}}==
=={{header|GAP}}==
<lang gap>Read("file");</lang>
<lang gap>Read("file");</lang>

=={{header|Gnuplot}}==
<lang gnuplot>load "filename.gnuplot"</lang>

This is the same as done for each file named on the command line. Special filename <code>"-"</code> reads from standard input.

<lang gnuplot>load "-" # read standard input</lang>

If the system has <code>popen</code> then piped output from another program can be loaded,

<lang gnuplot>load "< myprogram" # run myprogram, read its output
load "< echo print 123"</lang>

<code>call</code> is the same as <code>load</code> but takes parameters which are then available to the sub-script as <code>$0</code> through <code>$9</code>

<lang gnuplot>call "filename.gnuplot" 123 456 "arg3"</lang>


=={{header|Haskell}}==
=={{header|Haskell}}==