Include a file: Difference between revisions

Content added Content deleted
m (Edited formatting)
(Add BaCon)
Line 204: Line 204:
This will cause the program called OTHER to be parsed as if it was contained in the source code instead of this line.
This will cause the program called OTHER to be parsed as if it was contained in the source code instead of this line.
<lang axe>prgmOTHER</lang>
<lang axe>prgmOTHER</lang>

=={{header|BaCon}}==
''other.bac''
<lang freebasic>other = 42</lang>
''including.bac''
<lang freebasic>' Include a file
INCLUDE "other.bac"
PRINT other</lang>

{{out}}
<pre>prompt$ bacon including.bac
Converting 'including.bac'... done, 4 lines were processed in 0.005 seconds.
Compiling 'including.bac'... cc -c including.bac.c
cc -o including including.bac.o -lbacon -lm
Done, program 'including' ready.
prompt$ ./including
42</pre>


=={{header|BASIC}}==
=={{header|BASIC}}==