Modulinos: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: changed/added comments, changed a variable name.) |
(→{{header|Io}}: made ideomatic) |
||
Line 615: | Line 615: | ||
ScriptedMain meaningOfLife := 42 |
ScriptedMain meaningOfLife := 42 |
||
if( isLaunchScript, |
|||
main := method( |
|||
"Main: The meaning of life is #{ScriptedMain meaningOfLife}" interpolate println |
|||
)</lang> |
|||
) |
|||
if (System args size > 0 and System args at(0) containsSeq("ScriptedMain"), main)</lang> |
|||
test.io: |
test.io: |
||
Line 625: | Line 623: | ||
<lang io>#!/usr/bin/env io |
<lang io>#!/usr/bin/env io |
||
⚫ | |||
main := method( |
|||
⚫ | |||
) |
|||
if (System args size > 0 and System args at(0) containsSeq("test"), main)</lang> |
|||
<lang sh>$ ./ScriptedMain.io |
<lang sh>$ ./ScriptedMain.io |