<SPAN CLASS="TOKEN" >main</SPAN >

Sather - Language Specification
Prev | Chapter 12. Special feature names | Next

# 12.2. main

A distinguished non-parameterized immutable or reference class is specified when a Sather program is compiled, usually 'MAIN'. This class must define a routine named 'main'. When the program executes, an object of the specified type is created and 'main' is called on it. If main is declared to have an argument of type ARRAY{STR}, it will be passed an array of any command line arguments provided by the environment when the program is called. If it is declared to have a return value of type INT, this will specify the exit code of the program when it finishes execution.

Prev | Home | Next
Special feature names | Up | Built-in classes