Multiline shebang: Difference between revisions
Content added Content deleted
(→{{header|Smalltalk}}: bash idioms) |
(→{{header|F Sharp|F#}}: bash idioms) |
||
Line 139: | Line 139: | ||
=={{header|F Sharp|F#}}== |
=={{header|F Sharp|F#}}== |
||
F# scripts may be run with dot-slash notation using the following multiline shebang: |
|||
<lang f#>#light (* |
<lang f#>#light (* |
||
exec fsharpi --exec $0 --quiet |
exec fsharpi --exec "$0" --quiet |
||
*) |
*) |
||
let main = printfn "Hello World"</lang> |
let main = printfn "Hello World"</lang> |
||
However, if a script has any dependencies that need to be compiled in, the fsharpi interpreter will not understand how to import them. This means dot-slashing is no longer viable, and the script must be compiled in order to run properly. The shebang can stay, but it is best to remove it, to make clear to users that the script should not be dot-slashed. |
|||
=={{header|Factor}}== |
=={{header|Factor}}== |