Create an executable for a program in an interpreted language: Difference between revisions
Content added Content deleted
(Created Nim solution.) |
(julia example) |
||
Line 402: | Line 402: | ||
Variations and further details are given in the [https://github.com/stedolan/jq/wiki/FAQq%20FAQ jq FAQ]. |
Variations and further details are given in the [https://github.com/stedolan/jq/wiki/FAQq%20FAQ jq FAQ]. |
||
=={{header|Julia}}== |
|||
<syntaxhighlight lang="julia"> |
|||
using StaticCompiler, StaticTools |
|||
hello() = println(c"Hello world!") # the c"" hsyntax defines static C type string |
|||
compile_executable(hello, (), "./") # can now run this as executable "hello" |
|||
</syntaxhighlight>{{out}} |
|||
<pre> |
|||
$ ./hello |
|||
Hello world! |
|||
</pre> |
|||
=={{header|Nim}}== |
=={{header|Nim}}== |