2023-07-01 11:58:00 -04:00
|
|
|
import extensions;
|
|
|
|
|
|
|
|
|
|
class MyClass
|
|
|
|
|
{
|
2023-09-01 09:35:06 -07:00
|
|
|
int Variable : prop;
|
2023-07-01 11:58:00 -04:00
|
|
|
|
|
|
|
|
someMethod()
|
|
|
|
|
{
|
|
|
|
|
Variable := 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
constructor()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public program()
|
|
|
|
|
{
|
|
|
|
|
// instantiate the class
|
|
|
|
|
var instance := new MyClass();
|
|
|
|
|
|
|
|
|
|
// invoke the method
|
|
|
|
|
instance.someMethod();
|
|
|
|
|
|
|
|
|
|
// get the variable
|
|
|
|
|
console.printLine("Variable=",instance.Variable)
|
|
|
|
|
}
|