Create an executable for a program in an interpreted language: Difference between revisions
Create an executable for a program in an interpreted language (view source)
Revision as of 07:53, 3 December 2023
, 6 months ago→{{header|Julia}}
(Created Nim solution.) |
|||
(One intermediate revision by the same user not shown) | |||
Line 402:
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"" syntax defines a static C type string
compile_executable(hello, (), "./") # can now run this as executable "hello"
</syntaxhighlight>{{out}}
<pre>
$ ./hello
Hello world!
</pre>
=={{header|Nim}}==
|