Modulinos: Difference between revisions

Use 'lifemain'
(Added PicoLisp)
(Use 'lifemain')
Line 673:
 
=={{header|PicoLisp}}==
PicoLisp normally does it the other way round: It calls main from the command line with the '-' syntax if desired. Create an executable file (chmod +x) "life.l":
Executable file (chmod +x) "life.l":
<lang PicoLisp>#!/usr/bin/picolisp /usr/lib/picolisp/lib.l
 
Line 679:
42 )
 
(whende lifemain (opt)
(prinl "Main: The meaning of life is " (meaningOfLife))
(bye) )</lang>
Executableand an executable file (chmod +x) "test.l":
<lang PicoLisp>#!/usr/bin/picolisp /usr/lib/picolisp/lib.l
 
Line 690:
(bye)</lang>
Test:
<pre>$ ./life.l -mlifemain
Main: The meaning of life is 42
 
Anonymous user