Modulinos: Difference between revisions

m
m (→‎{{header|Wren}}: Minor tidy)
 
Line 2,019:
 
First we create a module for our modulino:
<syntaxhighlight lang="ecmascriptwren">/* modulinoModulinos.wren */
 
var MeaningOfLife = Fn.new { 42 }
Line 2,029:
// Check if it's being used as a library or not.
import "os" for Process
if (Process.allArguments[1] == "modulinoModulinos.wren") { // if true, not a library
main.call()
}</syntaxhighlight>
Line 2,040:
 
Next we create another module which imports the modulino:
<syntaxhighlight lang="ecmascriptwren">/* modulino_mainModulinos_main.wren */
 
import "./modulinoModulinos" for MeaningOfLife
 
var main = Fn.new {
9,476

edits