"Sputnik" help  
Sputnik Help
Language Reference - Classes - Class Magic Functions - ConstructStatic

Class Magic Functions - ConstructStatic

This function is immediately executed when a class is defined in code and can be used for setting up Static Class stuff or simply to execute stuff the moment the class definition is fully parsed.

class Cat
{
    Function __ConstructStatic()
    {
        Cat:$meows = 3;
    }
    Function Meow()
    {
        say "Meow! x" . Cat:$meows;
    }
}

Cat:Meow();
Cat:$meows = 10;
Cat:Meow();

// PRINTS
// Meow! x3
// Meow! x10

To learn more go see Static Classes.

A full list of all possible magic functions can be found here.


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org