Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Call-an-object-method/Zkl/call-an-object-method.zkl
Normal file
11
Task/Call-an-object-method/Zkl/call-an-object-method.zkl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class C{var v; fcn f{v}}
|
||||
C.f() // call function f in class C
|
||||
C.v=5; c2:=C(); // create new instance of C
|
||||
println(C.f()," ",c2.f()) //-->5 Void
|
||||
C.f.isStatic //--> False
|
||||
|
||||
class [static] D{var v=123; fcn f{v}}
|
||||
D.f(); D().f(); // both return 123
|
||||
D.f.isStatic //-->False
|
||||
|
||||
class E{var v; fcn f{}} E.f.isStatic //-->True
|
||||
Loading…
Add table
Add a link
Reference in a new issue