Fields look like java field definitions including the initializer:
classs T {
type field1 = init1;
type field2; // initializer is optional
}
While Mantra is not statically typed, you still need to specify a
field type. You can also specify static and const to indicate class
variables:
class T {
static int x = 3;
const HEIGHT = 100;
}
Comments (1)
Dec 22, 2008
Anonymous says:
typo in first example classs instead of classtypo in first example classs instead of class
Add Comment