Start from a main routine: Difference between revisions

no edit summary
m (→‎{{header|Racket}}: Fix <lang> tag)
No edit summary
Line 26:
print "Hello World!"
}</lang>
 
=={{header|Erlang}}==
When started Erlang enters a REPL (read-eval-print loop). To call a function called main in the module m you do: erl -run m main argument1 argument 2 ...
 
=={{header|Gambas}}==
Line 65 ⟶ 68:
 
=={{header|Perl 6}}==
When executed with the standard setting, Perl  6 code always runs the mainline code automatically, followed by the <tt>MAIN</tt> function if you have one. However, it's possible to start up with an alternate setting that might want to create its own event loop or <tt>MAIN</tt>. In such cases you can
always capture control at various phases with blocks that we call "phasers":
<lang perl6>BEGIN {...} # as soon as parsed
Anonymous user