Online Manual: Program Startup
(Note to Readers: This is perhaps the least stable section of this document. Since our research project also includes a module system which is under development, the proposal in this section is only for the practical use of Classages and might be changed over time.)
A Classages program is composed of classages, with one of them being the startup classage, similar to Java's class with main method defined. Followed is the most simple Classages program:
startup classage MyApp {
main(String[] args) {
create X();
}
}
classage X {
X() {
int x = 0;
}
}
The startup classage is decorated with the keyword startup,
and has a special method main defined: it takes in a
String array as arguments (command line input), and does not
declare a return type.
The classages forming one application can straddle in in multiple physical files. The compiler does not allow for any two classages having the same name during compilation.