Modulinos: Difference between revisions

m
(J)
Line 161:
=={{header|J}}==
 
Probably the simplest way to achive what I imagine "scripted main" to be, in J, involves the use of the [http://www.jsoftware.com/help/dictionary/dx009.htm Immex Phrase]. Here, just before the script ends, you define the "main" which would take control if the script was used as a stand alone program.
 
Here is an example "scripted main" program, using this approach:
6,962

edits