Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Creates a module-wide class to hold your code. Moves all the def statements (methods) into this cass, and moves the code that should be executed when a script is run into its own Main method inside the module class.

For example this code:

No Format
myarray = (1, 2, 3)
for item in myarray:
	System.Console.WriteLine(item)

is transformed into this:

No Format
[Boo.Lang.ModuleAttribute]
public final transient class TempModule:

	private static def Main(argv as (string)) as System.Void:
		myarray = (1, 2, 3)
		for item in myarray:
			System.Console.WriteLine(item)

	private def constructor():
		pass