Modulinos: Difference between revisions
Content added Content deleted
(Created Nim solution.) |
No edit summary |
||
Line 423: | Line 423: | ||
(load "scriptedmain.el" nil t) |
(load "scriptedmain.el" nil t) |
||
(message "Test: The meaning of life is %d" (meaning-of-life)))</syntaxhighlight> |
(message "Test: The meaning of life is %d" (meaning-of-life)))</syntaxhighlight> |
||
=={{header|EMal}}== |
|||
{{trans|Wren}} |
|||
<syntaxhighlight lang="emal"> |
|||
in Org:RosettaCode |
|||
type Modulino |
|||
fun meaningOfLife = int by block do return 42 end |
|||
fun main = void by block do writeLine("The meaning of life is " + meaningOfLife() + ".") end |
|||
if Runtime.direct() do main() end |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
emal.exe Org\RosettaCode\Modulino.emal |
|||
The meaning of life is 42. |
|||
</pre> |
|||
<syntaxhighlight lang="emal"> |
|||
in Org:RosettaCode |
|||
load :Modulino |
|||
type ModulinoMain |
|||
fun main = int by List args |
|||
writeLine("Who says the meaning of life is " + Modulino.meaningOfLife() + "?") |
|||
return 0 |
|||
end |
|||
exit main(Runtime.args) |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
emal.exe Org\RosettaCode\ModulinoMain.emal |
|||
Who says the meaning of life is 42? |
|||
</pre> |
|||
=={{header|Erlang}}== |
=={{header|Erlang}}== |