Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Classes/Elena/classes.elena
Normal file
27
Task/Classes/Elena/classes.elena
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import extensions;
|
||||
|
||||
class MyClass
|
||||
{
|
||||
prop int Variable;
|
||||
|
||||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue