Modulinos: Difference between revisions
Content added Content deleted
(Emphasis.) |
(Added PicoLisp) |
||
Line 671: | Line 671: | ||
echo "Test: The meaning of life is " . meaning_of_life() . "\n"; |
echo "Test: The meaning of life is " . meaning_of_life() . "\n"; |
||
?></lang> |
?></lang> |
||
=={{header|PicoLisp}}== |
|||
Executable file (chmod +x) "life.l": |
|||
<lang PicoLisp>#!/usr/bin/picolisp /usr/lib/picolisp/lib.l |
|||
(de meaningOfLife () |
|||
42 ) |
|||
(when (opt) |
|||
(prinl "Main: The meaning of life is " (meaningOfLife)) |
|||
(bye) )</lang> |
|||
Executable file (chmod +x) "test.l": |
|||
<lang PicoLisp>#!/usr/bin/picolisp /usr/lib/picolisp/lib.l |
|||
(load "life.l") |
|||
(prinl "Test: The meaning of life is " (meaningOfLife)) |
|||
(bye)</lang> |
|||
Test: |
|||
<pre>$ ./life.l -m |
|||
Main: The meaning of life is 42 |
|||
$ ./test.l |
|||
Test: The meaning of life is 42</pre> |
|||
=={{header|Python}}== |
=={{header|Python}}== |