Multiline shebang: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix code: Perl 6 --> Raku) |
|||
Line 383: | Line 383: | ||
c |
c |
||
</pre> |
</pre> |
||
=={{header|Nim}}== |
|||
In Nim, multiline comments start with <code>#[</code> and end with <code>]#</code>. This allows to build a polyglot program which can be run as a shell script and compiled as a Nim program. |
|||
<Lang Nim>#!/bin/bash |
|||
#[ |
|||
echo Put here code to run as a shell script. |
|||
exit # This is needed to ignore last part of the file. |
|||
]# |
|||
# Nim program |
|||
echo "Executing Nim program" |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |